Use CMAKE_CONFIGURATION_TYPES instead of manually listing the possible configuration types.

pull/313/head
AnyOldName3 7 years ago
parent f9a3562ccd
commit b00b94f0db

@ -173,25 +173,15 @@ macro (openmw_add_executable target)
endmacro (openmw_add_executable)
macro (copy_resource_file source_path destination_dir_base dest_path_relative)
if (MSVC)
configure_file(${source_path} "${destination_dir_base}/Debug/${dest_path_relative}" COPYONLY)
configure_file(${source_path} "${destination_dir_base}/Release/${dest_path_relative}" COPYONLY)
configure_file(${source_path} "${destination_dir_base}/RelWithDebInfo/${dest_path_relative}" COPYONLY)
configure_file(${source_path} "${destination_dir_base}/MinSizeRel/${dest_path_relative}" COPYONLY)
else (MSVC)
configure_file(${source_path} "${destination_dir_base}/${dest_path_relative}" COPYONLY)
endif (MSVC)
foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES})
configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}" COPYONLY)
endforeach(cfgtype)
endmacro (copy_resource_file)
macro (configure_resource_file source_path destination_dir_base dest_path_relative)
if (MSVC)
configure_file(${source_path} "${destination_dir_base}/Debug/${dest_path_relative}")
configure_file(${source_path} "${destination_dir_base}/Release/${dest_path_relative}")
configure_file(${source_path} "${destination_dir_base}/RelWithDebInfo/${dest_path_relative}")
configure_file(${source_path} "${destination_dir_base}/MinSizeRel/${dest_path_relative}")
else (MSVC)
configure_file(${source_path} "${destination_dir_base}/${dest_path_relative}")
endif (MSVC)
foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES})
configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}")
endforeach(cfgtype)
endmacro (configure_resource_file)
macro (copy_all_resource_files source_dir destination_dir_base destination_dir_relative files)

Loading…
Cancel
Save