diff --git a/src/modules/locale/CMakeLists.txt b/src/modules/locale/CMakeLists.txt index 6949ccfcc..990032e87 100644 --- a/src/modules/locale/CMakeLists.txt +++ b/src/modules/locale/CMakeLists.txt @@ -8,9 +8,6 @@ # to have a debugging-friendly timezone widget, debug logging, # and no intrusive timezone-setting while clicking around. option(DEBUG_TIMEZONES "Debug-friendly timezone widget." OFF) -if(DEBUG_TIMEZONES) - add_definitions(-DDEBUG_TIMEZONES) -endif() include_directories(${PROJECT_BINARY_DIR}/src/libcalamaresui) @@ -35,6 +32,9 @@ calamares_add_plugin(locale yamlcpp::yamlcpp SHARED_LIB ) +if(DEBUG_TIMEZONES) + target_compile_definitions(${localeq_TARGET} PRIVATE DEBUG_TIMEZONES) +endif() calamares_add_test( localetest diff --git a/src/modules/localeq/CMakeLists.txt b/src/modules/localeq/CMakeLists.txt index 0eace3e2d..eb7cbf0d4 100644 --- a/src/modules/localeq/CMakeLists.txt +++ b/src/modules/localeq/CMakeLists.txt @@ -12,9 +12,6 @@ endif() # to have a debugging-friendly timezone widget, debug logging, # and no intrusive timezone-setting while clicking around. option(DEBUG_TIMEZONES "Debug-friendly timezone widget." OFF) -if(DEBUG_TIMEZONES) - add_definitions(-DDEBUG_TIMEZONES) -endif() find_package(${qtname}Location CONFIG) set_package_properties(${qtname}Location PROPERTIES DESCRIPTION "Used for rendering the map" TYPE RUNTIME) @@ -24,8 +21,6 @@ set_package_properties(${qtname}Positioning PROPERTIES DESCRIPTION "Used for Geo # Because we're sharing sources with the regular locale module set(_locale ${CMAKE_CURRENT_SOURCE_DIR}/../locale) -include_directories(${_locale}) - calamares_add_plugin(localeq TYPE viewmodule EXPORT_MACRO PLUGINDLLEXPORT_PRO @@ -41,3 +36,7 @@ calamares_add_plugin(localeq ${qtname}::Network SHARED_LIB ) +target_include_directories(${localeq_TARGET} PRIVATE ${_locale}) +if(DEBUG_TIMEZONES) + target_compile_definitions(${localeq_TARGET} PRIVATE DEBUG_TIMEZONES) +endif()