diff --git a/CMakeLists.txt b/CMakeLists.txt index 796c292a..7de6956a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.8) +cmake_minimum_required(VERSION 2.8) PROJECT(picrin) @@ -18,9 +18,6 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY lib) set(CMAKE_C_FLAGS "-Wall -Wextra -std=c99") set(CMAKE_C_FLAGS_DEBUG "-g -DDEBUG=1") -# external libraries -add_library(xfile OBJECT extlib/xfile/xfile.c) - # build picrin include_directories(include extlib) include(src/CMakeLists.txt) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cbecb0a8..6a9705c0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,7 +3,10 @@ find_package(FLEX REQUIRED) flex_target(scan src/scan.l ${PROJECT_SOURCE_DIR}/src/lex.yy.c COMPILE_FLAGS --header-file="src/lex.yy.h") set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${PROJECT_SOURCE_DIR}/src/lex.yy.h) +# xfile +set(XFILE_SOURCES extlib/xfile/xfile.c) + # build! file(GLOB C_SOURCES ${PROJECT_SOURCE_DIR}/src/*.c) -add_library(picrin SHARED ${C_SOURCES} ${FLEX_scan_OUTPUTS} $) +add_library(picrin SHARED ${C_SOURCES} ${FLEX_scan_OUTPUTS} ${XFILE_SOURCES}) target_link_libraries(picrin m)