some compilers don't support liking a static library into another shared
library. compiling xfile into an object file instead.
This commit is contained in:
parent
e4ead0da48
commit
19371d1d81
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 2.8.8)
|
||||
|
||||
PROJECT(picrin)
|
||||
|
||||
|
@ -15,12 +15,11 @@ execute_process(
|
|||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY lib)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY lib)
|
||||
set(CMAKE_C_FLAGS "-Wall -Wextra -std=c99")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-g -DDEBUG=1")
|
||||
|
||||
# external libraries
|
||||
add_library(xfile STATIC extlib/xfile/xfile.c)
|
||||
add_library(xfile OBJECT extlib/xfile/xfile.c)
|
||||
|
||||
# build picrin
|
||||
include_directories(include extlib)
|
||||
|
|
|
@ -5,5 +5,5 @@ set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${PROJECT_SOURCE
|
|||
|
||||
# build!
|
||||
file(GLOB C_SOURCES ${PROJECT_SOURCE_DIR}/src/*.c)
|
||||
add_library(picrin SHARED ${C_SOURCES} ${FLEX_scan_OUTPUTS})
|
||||
target_link_libraries(picrin m xfile)
|
||||
add_library(picrin SHARED ${C_SOURCES} ${FLEX_scan_OUTPUTS} $<TARGET_OBJECTS:xfile>)
|
||||
target_link_libraries(picrin m)
|
||||
|
|
Loading…
Reference in New Issue