mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Fix resource copying on non-MSVC targets
This commit is contained in:
parent
b00b94f0db
commit
1f86fa3c31
1 changed files with 24 additions and 6 deletions
|
@ -172,16 +172,34 @@ macro (openmw_add_executable target)
|
|||
endif (MSVC)
|
||||
endmacro (openmw_add_executable)
|
||||
|
||||
macro (get_generator_is_multi_config VALUE)
|
||||
if (CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9)
|
||||
set(${VALUE} ${GENERATOR_IS_MULTI_CONFIG})
|
||||
else (CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9)
|
||||
list(LENGTH ${CMAKE_CONFIGURATION_TYPES} ${VALUE})
|
||||
endif ((CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9))
|
||||
endmacro (get_generator_is_multi_config)
|
||||
|
||||
macro (copy_resource_file source_path destination_dir_base dest_path_relative)
|
||||
foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES})
|
||||
configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}" COPYONLY)
|
||||
endforeach(cfgtype)
|
||||
get_generator_is_multi_config(multi_config)
|
||||
if (multi_config)
|
||||
foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES})
|
||||
configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}" COPYONLY)
|
||||
endforeach(cfgtype)
|
||||
else (multi_config)
|
||||
configure_file(${source_path} "${destination_dir_base}/${dest_path_relative}" COPYONLY)
|
||||
endif (multi_config)
|
||||
endmacro (copy_resource_file)
|
||||
|
||||
macro (configure_resource_file source_path destination_dir_base dest_path_relative)
|
||||
foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES})
|
||||
configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}")
|
||||
endforeach(cfgtype)
|
||||
get_generator_is_multi_config(multi_config)
|
||||
if (multi_config)
|
||||
foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES})
|
||||
configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}")
|
||||
endforeach(cfgtype)
|
||||
else (multi_config)
|
||||
configure_file(${source_path} "${destination_dir_base}/${dest_path_relative}")
|
||||
endif (multi_config)
|
||||
endmacro (configure_resource_file)
|
||||
|
||||
macro (copy_all_resource_files source_dir destination_dir_base destination_dir_relative files)
|
||||
|
|
Loading…
Reference in a new issue