File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ add_custom_command(OUTPUT ${stamp_file}
314
314
315
315
316
316
#---Copy files to the build area at build time---------------------------------
317
- set (directories_to_copy etc test icons fonts macros tutorials )
317
+ set (directories_to_copy test icons fonts macros tutorials )
318
318
if (http )
319
319
list (APPEND directories_to_copy js )
320
320
endif ()
@@ -337,6 +337,25 @@ foreach(dir_to_copy ${directories_to_copy})
337
337
DEPENDS ${artifacts_in} )
338
338
endforeach ()
339
339
340
+ #---Copy etc/* files individually to the build area at build time---------------------------------
341
+ # The reason why we don't copy these files with copy_directory as above is that
342
+ # we want to exclude a subset of the files.
343
+ file (GLOB_RECURSE artifact_files RELATIVE ${CMAKE_SOURCE_DIR} etc/* )
344
+
345
+ # Exclude the *.in files, just like in the install tree
346
+ list (FILTER artifact_files EXCLUDE REGEX "\. (in)$" )
347
+
348
+ foreach (artifact_file ${artifact_files} )
349
+ add_custom_command (OUTPUT ${CMAKE_BINARY_DIR} /${artifact_file}
350
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR} /${artifact_file} ${CMAKE_BINARY_DIR} /${artifact_file}
351
+ COMMENT "Copying ${CMAKE_SOURCE_DIR} /${artifact_file} "
352
+ DEPENDS ${CMAKE_SOURCE_DIR} /${artifact_file} )
353
+ list (APPEND all_artifacts ${CMAKE_BINARY_DIR} /${artifact_file} )
354
+ endforeach ()
355
+
356
+ unset (artifact_files )
357
+
358
+
340
359
add_custom_target (move_artifacts DEPENDS ${stamp_file} ${all_artifacts} )
341
360
342
361
You can’t perform that action at this time.
0 commit comments