Browse Source

CMake: Make CompositeSources skip sources with SKIP_COMPOSITING property

Sam Edwards 7 years ago
parent
commit
986377b131
1 changed files with 2 additions and 1 deletions
  1. 2 1
      cmake/macros/CompositeSources.cmake

+ 2 - 1
cmake/macros/CompositeSources.cmake

@@ -61,9 +61,10 @@ function(composite_sources target sources_var)
     # Check if we can safely add this to a composite file.
     # Check if we can safely add this to a composite file.
     get_source_file_property(generated "${source}" GENERATED)
     get_source_file_property(generated "${source}" GENERATED)
     get_source_file_property(is_header "${source}" HEADER_FILE_ONLY)
     get_source_file_property(is_header "${source}" HEADER_FILE_ONLY)
+    get_source_file_property(skip_compositing "${source}" SKIP_COMPOSITING)
     get_filename_component(extension "${source}" EXT)
     get_filename_component(extension "${source}" EXT)
 
 
-    if(NOT generated AND NOT is_header AND
+    if(NOT generated AND NOT is_header AND NOT skip_compositing AND
         ";${COMPOSITE_SOURCE_EXTENSIONS};" MATCHES ";${extension};")
         ";${COMPOSITE_SOURCE_EXTENSIONS};" MATCHES ";${extension};")
       # Add it to composite_sources.
       # Add it to composite_sources.
       list(APPEND composite_sources ${source})
       list(APPEND composite_sources ${source})