diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-30 10:07:42 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-30 10:07:42 +0100 |
commit | 48c30a3d75d18e87e39c18cb52961bb37ab6055e (patch) | |
tree | 1d6f2faa511eed9f6dac6630673efa6564ea7027 /gui | |
parent | 8318ee4d821a4826b8e80369f499b3758abe8f4c (diff) |
qxt: fix unix build
Diffstat (limited to 'gui')
-rw-r--r-- | gui/CMakeLists.txt | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 51d0cea3..b2540a68 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -1,25 +1,5 @@ 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() @@ -30,12 +10,19 @@ 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(UNIX OR APPLE) + target_include_directories(opentrack PRIVATE "${CMAKE_SOURCE_DIR}/qxt-mini") + opentrack_library(opentrack-qxt-mini ${CMAKE_SOURCE_DIR}/qxt-mini NO-LINKER-SCRIPT STATIC) + if(NOT APPLE) + target_link_libraries(opentrack-qxt-mini X11) + endif() +endif() + if(NOT WIN32) set_target_properties(opentrack PROPERTIES SUFFIX ".bin") endif() |