|
|
|
@ -88,13 +88,6 @@ endforeach (u)
|
|
|
|
|
source_group ("components\\${dir}" FILES ${files})
|
|
|
|
|
endmacro (add_component_qt_dir)
|
|
|
|
|
|
|
|
|
|
macro (copy_all_files source_dir destination_dir files)
|
|
|
|
|
foreach (f ${files})
|
|
|
|
|
get_filename_component(filename ${f} NAME)
|
|
|
|
|
configure_file(${source_dir}/${f} ${destination_dir}/${filename} COPYONLY)
|
|
|
|
|
endforeach (f)
|
|
|
|
|
endmacro (copy_all_files)
|
|
|
|
|
|
|
|
|
|
macro (add_file project type file)
|
|
|
|
|
list (APPEND ${project}${type} ${file})
|
|
|
|
|
endmacro (add_file)
|
|
|
|
@ -171,3 +164,40 @@ macro (openmw_add_executable target)
|
|
|
|
|
endif (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8)
|
|
|
|
|
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)
|
|
|
|
|
get_cmake_property(${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)
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
foreach (f ${files})
|
|
|
|
|
get_filename_component(filename ${f} NAME)
|
|
|
|
|
copy_resource_file("${source_dir}/${f}" "${destination_dir_base}" "${destination_dir_relative}/${filename}")
|
|
|
|
|
endforeach (f)
|
|
|
|
|
endmacro (copy_all_resource_files)
|