diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-01 08:56:23 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-01 08:56:23 +0100 |
commit | 7e3807d048c5e0a8e0aa64fb49807bf5dfd11fc1 (patch) | |
tree | 22029a8b36a593585dcd962b81ff80199a4f9984 /cmake | |
parent | 664aefb41351113fbd43962aa534befe18ff9d4a (diff) | |
parent | 0ff658f908bc3e07bca9987dfd5b7c365b7d8353 (diff) |
Merge branch 'unstable' into trackhat
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/opentrack-install.cmake | 10 | ||||
-rw-r--r-- | cmake/opentrack-macros.cmake | 7 | ||||
-rw-r--r-- | cmake/opentrack-platform.cmake | 7 |
3 files changed, 12 insertions, 12 deletions
diff --git a/cmake/opentrack-install.cmake b/cmake/opentrack-install.cmake index 53ede730..ade8861a 100644 --- a/cmake/opentrack-install.cmake +++ b/cmake/opentrack-install.cmake @@ -15,13 +15,3 @@ install(FILES "${CMAKE_SOURCE_DIR}/bin/NPClient64.dll" "${CMAKE_SOURCE_DIR}/bin/TrackIR.exe" DESTINATION . ${opentrack-perms}) - -if(APPLE) - install(CODE " - execute_process(COMMAND /bin/sh \"${CMAKE_SOURCE_DIR}/macosx/make-app-bundle.sh\" - \"${CMAKE_SOURCE_DIR}/macosx\" - \"${CMAKE_INSTALL_PREFIX}\" - \"${CMAKE_BINARY_DIR}\" - \"${OPENTRACK_COMMIT}\") - ") -endif() diff --git a/cmake/opentrack-macros.cmake b/cmake/opentrack-macros.cmake index df19ddf0..e43dc3b5 100644 --- a/cmake/opentrack-macros.cmake +++ b/cmake/opentrack-macros.cmake @@ -50,9 +50,10 @@ macro(opentrack_library n dir) add_library(${n} ${link-mode} ${${n}-all}) set(link-mode) if(NOT opentrack-foolib_NO-COMPAT) - target_link_libraries(${n} opentrack-api ${MY_QT_LIBS} opentrack-compat) + target_link_libraries(${n} opentrack-api opentrack-compat) endif() - if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE AND NOT NO-LINKER-SCRIPT) + target_link_libraries(${n} ${MY_QT_LIBS}) + if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE AND NOT opentrack-foolib_NO-LINKER-SCRIPT) SET_TARGET_PROPERTIES(${n} PROPERTIES LINK_FLAGS "${opentrack-foolib_LINK} ${opentrack-foolib_GNU-LINK} -Wl,--as-needed -Wl,--version-script=\"${CMAKE_SOURCE_DIR}/opentrack-compat/${version-script}-version-script.txt\"" COMPILE_FLAGS "${opentrack-foolib_COMPILE} ${opentrack-foolib_GNU-COMPILE} -fvisibility=hidden -fvisibility-inlines-hidden" @@ -65,6 +66,8 @@ macro(opentrack_library n dir) set_target_properties(${n} PROPERTIES LINK_FLAGS "${link-flags} ${opentrack-foolib_LINK}" COMPILE_FLAGS "${opentrack-foolib_COMPILE}") set(link-flags) endif() + string(REPLACE "-" "_" n_ ${n}) + target_compile_definitions(${n} PRIVATE "BUILD_${n_}") if(NOT opentrack-foolib_STATIC) install(TARGETS ${n} RUNTIME DESTINATION . LIBRARY DESTINATION .) endif() diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake index aac3a2b8..c659e4c0 100644 --- a/cmake/opentrack-platform.cmake +++ b/cmake/opentrack-platform.cmake @@ -58,3 +58,10 @@ if(CMAKE_COMPILER_IS_GNUCXX OR APPLE) endif() set_property(GLOBAL PROPERTY USE_FOLDERS OFF) + +# nix -rdynamic passed from Linux-GNU.cmake +if(CMAKE_COMPILER_IS_GNUCXX) + set(__LINUX_COMPILER_GNU 1) + set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) + set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) +endif() |