For the recommended approach of including an explicit list of pattern files, is this the right way to do it?
... set(PATTERN_FILES # (found in the "patterns" folder) example1.vti example2.vti subfolder1/example3.vti ) ... #--------------------------copy pattern files to build folder--------------------------------- foreach( pattern_file ${PATTERN_FILES} ) add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/patterns/${pattern_file}" COMMAND cmake -E copy "${CMAKE_CURRENT_SOURCE_DIR}/patterns/${pattern_file}" "${CMAKE_CURRENT_BINARY_DIR}/patterns/${pattern_file}" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/patterns/${pattern_file}" ) list( APPEND pattern_files_dest "${CMAKE_CURRENT_BINARY_DIR}/patterns/${pattern_file}" ) endforeach( pattern_file ) add_custom_target( CopyPatterns ALL DEPENDS ${pattern_files_dest} ) #----------------------------------------install------------------------------------------------ ... foreach( pattern_file ${PATTERN_FILES} ) get_filename_component( path_name "patterns/${pattern_file}" PATH ) install( FILES "patterns/${pattern_file}" DESTINATION ${path_name} ) endforeach() ... -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake