2022-08-05 01:59:19 -04:00
|
|
|
include(CMakePrintHelpers)
|
|
|
|
|
|
|
|
string(REPLACE "\\ " " " sources_dir "${src_dir}")
|
|
|
|
string(REPLACE "\\ " " " destination_dir "${dst_dir}")
|
|
|
|
|
|
|
|
file(GLOB_RECURSE _file_list RELATIVE "${sources_dir}" "${sources_dir}/*")
|
2022-03-21 21:53:51 -04:00
|
|
|
|
|
|
|
foreach( each_file ${_file_list} )
|
2022-08-05 01:59:19 -04:00
|
|
|
set(destinationfile "${destination_dir}/${each_file}")
|
|
|
|
set(sourcefile "${sources_dir}/${each_file}")
|
2022-03-21 21:53:51 -04:00
|
|
|
if(NOT EXISTS ${destinationfile} OR ${sourcefile} IS_NEWER_THAN ${destinationfile})
|
|
|
|
get_filename_component(destinationdir ${destinationfile} DIRECTORY)
|
|
|
|
file(COPY ${sourcefile} DESTINATION ${destinationdir})
|
|
|
|
endif()
|
2022-08-05 01:59:19 -04:00
|
|
|
endforeach(each_file)
|