2014-03-02 04:50:35 -05:00
|
|
|
# flex
|
2014-03-01 11:52:41 -05:00
|
|
|
find_package(FLEX REQUIRED)
|
2014-03-01 23:24:12 -05:00
|
|
|
flex_target(scan src/scan.l ${PROJECT_SOURCE_DIR}/src/lex.yy.c COMPILE_FLAGS --header-file="src/lex.yy.h")
|
2014-03-02 05:03:01 -05:00
|
|
|
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${PROJECT_SOURCE_DIR}/src/lex.yy.h)
|
2014-03-01 11:52:41 -05:00
|
|
|
|
2014-03-05 09:00:24 -05:00
|
|
|
# xfile
|
|
|
|
set(XFILE_SOURCES extlib/xfile/xfile.c)
|
|
|
|
|
2014-03-02 04:50:35 -05:00
|
|
|
# build!
|
|
|
|
file(GLOB C_SOURCES ${PROJECT_SOURCE_DIR}/src/*.c)
|
2014-03-05 09:00:24 -05:00
|
|
|
add_library(picrin SHARED ${C_SOURCES} ${FLEX_scan_OUTPUTS} ${XFILE_SOURCES})
|
2014-03-05 02:06:35 -05:00
|
|
|
target_link_libraries(picrin m)
|