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/opentrack-macros.cmake | |
parent | 664aefb41351113fbd43962aa534befe18ff9d4a (diff) | |
parent | 0ff658f908bc3e07bca9987dfd5b7c365b7d8353 (diff) |
Merge branch 'unstable' into trackhat
Diffstat (limited to 'cmake/opentrack-macros.cmake')
-rw-r--r-- | cmake/opentrack-macros.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
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() |