set_source_files_properties() overwrites previously specified
properties and does not have a way to append, which is bad when
e.g. conditionally adding multiple compile definitions to a file.
In this particular case, for main.cpp -DHAVE_UMASK would overwrite
-DEMBED_DATA, and thus resources would not be loaded.
Use set_property(SOURCE... APPEND PROPERTY...) instead.
- set_source_files_properties(oidentdconfiggenerator.cpp PROPERTIES COMPILE_DEFINITIONS HAVE_UMASK)
+ set_property(SOURCE oidentdconfiggenerator.cpp APPEND PROPERTY COMPILE_DEFINITIONS HAVE_UMASK)
endif()
if (Ldap_FOUND)
target_sources(${TARGET} PRIVATE ldapauthenticator.cpp)
target_link_libraries(${TARGET} PRIVATE Ldap::Ldap)
endif()
if (Ldap_FOUND)
target_sources(${TARGET} PRIVATE ldapauthenticator.cpp)
target_link_libraries(${TARGET} PRIVATE Ldap::Ldap)
- set_source_files_properties(core.cpp PROPERTIES COMPILE_DEFINITIONS HAVE_LDAP)
+ set_property(SOURCE core.cpp APPEND PROPERTY COMPILE_DEFINITIONS HAVE_LDAP)
endif()
if (Qca-qt5_FOUND)
endif()
if (Qca-qt5_FOUND)
# We need to initialize the appropriate resources, so let's give our main.cpp some hints
if (EMBED_DATA)
# We need to initialize the appropriate resources, so let's give our main.cpp some hints
if (EMBED_DATA)
- set_source_files_properties(main.cpp PROPERTIES COMPILE_DEFINITIONS EMBED_DATA)
+ set_property(SOURCE main.cpp APPEND PROPERTY COMPILE_DEFINITIONS EMBED_DATA)
- set_source_files_properties(main.cpp PROPERTIES COMPILE_DEFINITIONS HAVE_UMASK)
+ set_property(SOURCE main.cpp APPEND PROPERTY COMPILE_DEFINITIONS HAVE_UMASK)
endif()
if (WITH_BUNDLED_ICONS)
endif()
if (WITH_BUNDLED_ICONS)