diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-01 09:09:25 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-01 09:09:25 +0100 |
commit | 0497f57268e8be7af69d37e24fa356e441c0d5f6 (patch) | |
tree | 26db6419e41f57806607f7a8e57f6875317b905e /cmake | |
parent | f90b77dd5e342ebc45259051d23d6396f37c660d (diff) |
cmake: less linkage boilerplate
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/opentrack-macros.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/opentrack-macros.cmake b/cmake/opentrack-macros.cmake index e43dc3b5..46cf3c61 100644 --- a/cmake/opentrack-macros.cmake +++ b/cmake/opentrack-macros.cmake @@ -66,7 +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}) + string(REGEX REPLACE "^opentrack-" "" n_ ${n}) + string(REPLACE "-" "_" n_ ${n_}) target_compile_definitions(${n} PRIVATE "BUILD_${n_}") if(NOT opentrack-foolib_STATIC) install(TARGETS ${n} RUNTIME DESTINATION . LIBRARY DESTINATION .) |