From 6bcbfa36ff9b4d5efaefe0520a7b7ab5a603dfa9 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 2 Mar 2019 16:55:22 +0100 Subject: cmake: use `target_compile_definitions()' --- cmake/opentrack-boilerplate.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 748a422f..d581aebd 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -183,13 +183,13 @@ function(otr_module n_) string(REPLACE "-" "_" build-n ${n_}) string(TOUPPER "${build-n}" build-n) - set_property(TARGET ${n} PROPERTY DEFINE_SYMBOL "BUILD_${build-n}") + target_compile_definitions(${n} PRIVATE "BUILD_${build-n}") get_property(ident GLOBAL PROPERTY opentrack-ident) if (".${ident}" STREQUAL ".") message(FATAL_ERROR "must set global property `opentrack-ident' in `opentrack-variant.cmake'") endif() - set_property(TARGET ${n} APPEND PROPERTY COMPILE_DEFINITIONS "OPENTRACK_ORG=\"${ident}\"") + target_compile_definitions(${n} PRIVATE OPENTRACK_ORG=\"${ident}\") if(arg_STATIC) set(arg_NO-INSTALL TRUE) -- cgit v1.2.3