diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-30 07:37:41 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-30 08:39:32 +0100 |
commit | aa066bdd4622d4f6824fee864f6be6806813f04d (patch) | |
tree | 3df328b8b364cba2373a85827191b259bd78d546 /facetracknoir/CMakeLists.txt | |
parent | d6a54431d178632a2bf466c9904f74abd143afe6 (diff) |
move to subdirectory-based build system
Closes #224
Diffstat (limited to 'facetracknoir/CMakeLists.txt')
-rw-r--r-- | facetracknoir/CMakeLists.txt | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/facetracknoir/CMakeLists.txt b/facetracknoir/CMakeLists.txt new file mode 100644 index 00000000..51d0cea3 --- /dev/null +++ b/facetracknoir/CMakeLists.txt @@ -0,0 +1,62 @@ +opentrack_boilerplate(opentrack NO-LIBRARY) + +if(UNIX OR APPLE) + target_include_directories(opentrack "${CMAKE_SOURCE_DIR}/qxt-mini") + if(APPLE) + set(qxt-plat mac) + else() + set(qxt-plat x11) + endif() + file(GLOB qxt-mini-c + ${CMAKE_SOURCE_DIR}/qxt-mini/*.h + ${CMAKE_SOURCE_DIR}/qxt-mini/qxtglobalshortcut.cpp + ${CMAKE_SOURCE_DIR}/qxt-mini/plat/qxtglobalshortcut_${qxt-plat}.cpp + ) + opentrack_qt(qxt-mini) + add_library(opentrack-qxt-mini STATIC ${qxt-mini-all}) + target_link_libraries(opentrack-qxt-mini ${MY_QT_LIBS}) + if(NOT APPLE) + target_link_libraries(opentrack-qxt-mini X11) + endif() +endif() + +if(WIN32) + SET(SDK_CONSOLE_DEBUG FALSE CACHE BOOL "Console window visible at runtime") +endif() + +if(WIN32 AND NOT SDK_CONSOLE_DEBUG) + set(opentrack-win32-executable WIN32) +else() + set(opentrack-win32-executable "") +endif() + +if(UNIX OR APPLE) + list(APPEND opentrack-c ${CMAKE_SOURCE_DIR}/qxt-mini/qxtglobalshortcut.h) +endif() +opentrack_qt(opentrack) +add_executable(opentrack ${opentrack-win32-executable} ${opentrack-all}) +opentrack_compat(opentrack) +if(NOT WIN32) + set_target_properties(opentrack PROPERTIES SUFFIX ".bin") +endif() +target_link_libraries(opentrack opentrack-api opentrack-version opentrack-pose-widget opentrack-spline-widget) +if(APPLE) + SET_TARGET_PROPERTIES(opentrack-qxt-mini PROPERTIES LINK_FLAGS "-framework Carbon -framework CoreFoundation") +endif() +if(UNIX OR APPLE) + target_link_libraries(opentrack opentrack-qxt-mini) +endif() +link_with_dinput8(opentrack) +target_link_libraries(opentrack ${MY_QT_LIBS}) + +if(APPLE) + # for process detector + target_link_libraries(opentrack proc) +endif() + +if(LINUX) + # for process detector + target_link_libraries(opentrack procps) +endif() + +install(TARGETS opentrack DESTINATION .) |