diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-01 08:35:17 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-01 08:49:12 +0100 |
commit | 73921613ddddc8d1f8e0caed21ab8dd490a74eb1 (patch) | |
tree | fd94316c584079d856d0e14339eccdcc04892b4a /cmake/opentrack-macros.cmake | |
parent | 8151bc76140b1e97f656101254e3a4e2d164129a (diff) |
cmake: add current module name to preprocessor vars
Diffstat (limited to 'cmake/opentrack-macros.cmake')
-rw-r--r-- | cmake/opentrack-macros.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/opentrack-macros.cmake b/cmake/opentrack-macros.cmake index e171a6fb..e43dc3b5 100644 --- a/cmake/opentrack-macros.cmake +++ b/cmake/opentrack-macros.cmake @@ -66,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() |