cmake: Fix source-specific compile definitions
[quassel.git] / src / main / CMakeLists.txt
index 60efe51..0367467 100644 (file)
@@ -10,7 +10,15 @@ endfunction()
 
 # 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)
+endif()
+
+if (HAVE_UMASK)
+    set_property(SOURCE main.cpp APPEND PROPERTY COMPILE_DEFINITIONS HAVE_UMASK)
+endif()
+
+if (WITH_BUNDLED_ICONS)
+    set_property(SOURCE main.cpp APPEND PROPERTY COMPILE_DEFINITIONS WITH_BUNDLED_ICONS)
 endif()
 
 # Build the executables