This commit is contained in:
Yuichi Nishiwaki 2014-05-21 01:34:32 +09:00
parent db1a99c63a
commit 5f84c781c0
1 changed files with 5 additions and 7 deletions

View File

@ -8,19 +8,17 @@ set(XFILE_SOURCES extlib/xfile/xfile.c)
# piclib
find_package(Perl REQUIRED)
set(PICLIB_SOURCES ${PROJECT_SOURCE_DIR}/src/load_piclib.c)
list(APPEND PICLIBS ${PICLIB_SCHEME_LIBS})
list(APPEND PICLIBS ${PICLIB_CONTRIB_LIBS})
set(PICLIB_SOURCE ${PROJECT_SOURCE_DIR}/src/load_piclib.c)
add_custom_command(
OUTPUT ${PICLIB_SOURCES}
COMMAND ${PERL_EXECUTABLE} etc/mkloader.pl ${PICLIBS} > ${PROJECT_SOURCE_DIR}/src/load_piclib.c
DEPENDS ${PICLIBS}
OUTPUT ${PICLIB_SOURCE}
COMMAND ${PERL_EXECUTABLE} etc/mkloader.pl ${PICLIB_SCHEME_LIBS} ${PICLIB_CONTRIB_LIBS} > ${PICLIB_SOURCE}
DEPENDS ${PICLIB_SCHEME_LIBS} ${PICLIB_CONTRIB_LIBS}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)
# build!
file(GLOB PICRIN_SOURCES ${PROJECT_SOURCE_DIR}/src/*.c)
add_library(picrin SHARED ${PICRIN_SOURCES} ${PICLIB_SOURCES} ${FLEX_scan_OUTPUTS} ${XFILE_SOURCES} ${PICRIN_CONTRIB_SOURCES})
add_library(picrin SHARED ${PICRIN_SOURCES} ${PICLIB_SOURCE} ${FLEX_scan_OUTPUTS} ${XFILE_SOURCES} ${PICRIN_CONTRIB_SOURCES})
target_link_libraries(picrin m ${PICRIN_CONTRIB_LIBRARIES})
# install