diff --git a/cmake/modules/KatieBuildMacros.cmake b/cmake/modules/KatieBuildMacros.cmake index f8f07f653..7948245d1 100644 --- a/cmake/modules/KatieBuildMacros.cmake +++ b/cmake/modules/KatieBuildMacros.cmake @@ -206,10 +206,10 @@ function(KATIE_SETUP_TARGET FORTARGET) foreach(srcstring ${ARGN}) get_filename_component(srcext ${srcstring} EXT) get_source_file_property(skip ${srcstring} ALLINONE_EXCLUDE) - if(skip) + if(skip OR "${srcext}" STREQUAL ".c") katie_warning("Source is excluded: ${srcstring}") - set(srcstring ${srcstring} ${srcstring}) - elseif(NOT "${srcext}" MATCHES "(.h|.qrc|.ui)" AND NOT "${srcext}" STREQUAL ".c") + set(excludesources ${excludesources} ${srcstring}) + elseif(NOT "${srcext}" MATCHES "(.h|.qrc|.ui)") set(allinonedata "${allinonedata}#include \"${srcstring}\"\n") endif() endforeach()