picrin/src/CMakeLists.txt

10 lines
420 B
CMake
Raw Normal View History

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-02 04:50:35 -05:00
# build!
file(GLOB C_SOURCES ${PROJECT_SOURCE_DIR}/src/*.c)
add_library(picrin SHARED ${C_SOURCES} ${FLEX_scan_OUTPUTS} $<TARGET_OBJECTS:xfile>)
target_link_libraries(picrin m)