-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c1c154
commit 792efa0
Showing
4 changed files
with
39 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,39 @@ | ||
project(InsomniaLib VERSION 1) | ||
|
||
build_target( | ||
NAME | ||
insomnia | ||
TYPE | ||
SHARED | ||
SOURCES | ||
src/serialize.cpp | ||
src/reflected.cpp | ||
LINKS | ||
spike-interface | ||
pugixml-interface | ||
NO_VERINFO | ||
NO_PROJECT_H) | ||
add_library(insomnia-interface INTERFACE) | ||
target_include_directories(insomnia-interface INTERFACE include) | ||
target_link_libraries(insomnia-interface INTERFACE spike-interface pugixml-interface) | ||
set(CORE_SOURCE_FILES src/serialize.cpp;src/reflected.cpp) | ||
|
||
target_compile_definitions( | ||
insomnia | ||
PRIVATE IS_EXPORT REF_EXPORT | ||
INTERFACE IS_IMPORT) | ||
if(NOT NO_OBJECTS) | ||
add_library(insomnia-objects OBJECT ${CORE_SOURCE_FILES}) | ||
target_link_libraries(insomnia-objects PUBLIC insomnia-interface) | ||
set_target_properties(insomnia-objects PROPERTIES POSITION_INDEPENDENT_CODE | ||
${OBJECTS_PID}) | ||
target_compile_options(insomnia-objects PRIVATE -fvisibility=hidden) | ||
|
||
target_include_directories(insomnia PUBLIC include) | ||
target_expose_defs(insomnia IS_EXPORT IS_IMPORT) | ||
endif() | ||
|
||
install( | ||
TARGETS insomnia | ||
LIBRARY NAMELINK_SKIP DESTINATION $<IF:$<BOOL:${MINGW}>,bin,lib> | ||
RUNTIME DESTINATION bin) | ||
if(BUILD_SHARED_LIBS) | ||
add_library(insomnia SHARED ${CORE_SOURCE_FILES}) | ||
target_link_libraries(insomnia insomnia-interface spike pugixml) | ||
target_compile_definitions( | ||
insomnia | ||
INTERFACE IS_IMPORT | ||
PRIVATE IS_EXPORT) | ||
|
||
if(WIN32 OR MINGW) | ||
set_target_properties( | ||
insomnia PROPERTIES SUFFIX ${PROJECT_VERSION_MAJOR}.dll PREFIX "") | ||
else() | ||
set_target_properties( | ||
insomnia PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION | ||
${PROJECT_VERSION_MAJOR}) | ||
endif() | ||
|
||
install( | ||
TARGETS insomnia | ||
LIBRARY NAMELINK_SKIP DESTINATION $<IF:$<BOOL:${MINGW}>,bin,lib> | ||
RUNTIME DESTINATION bin) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ build_target( | |
gltf.cpp | ||
LINKS | ||
gltf-interface | ||
insomnia | ||
insomnia-interface | ||
AUTHOR | ||
"Lukas Cone" | ||
DESCR | ||
|