From f8fe992dc0bdc393f847812bd321daf0eed32451 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Wed, 11 Oct 2017 21:58:55 +0100 Subject: [PATCH 01/10] Adjust CMake's run-time resource handling such that the Windows CI script does not have to copy these files --- CI/before_script.msvc.sh | 15 --------------- CMakeLists.txt | 24 ++++++++++++------------ cmake/GitVersion.cmake | 18 +++++++++++++++++- cmake/OpenMWMacros.cmake | 29 +++++++++++++++++++++++++++++ components/CMakeLists.txt | 9 ++++++--- files/mygui/CMakeLists.txt | 4 ++-- files/shaders/CMakeLists.txt | 4 ++-- 7 files changed, 68 insertions(+), 35 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 14998a3c6..a7f30d7ed 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -750,19 +750,4 @@ if [ -z $VERBOSE ]; then fi fi -if [ -z $CI ]; then - echo "- Copying Runtime Resources/Config Files" - echo " gamecontrollerdb.txt" - cp gamecontrollerdb.txt $BUILD_CONFIG/gamecontrollerdb.txt - echo " openmw.cfg" - cp openmw.cfg.install $BUILD_CONFIG/openmw.cfg - echo " openmw-cs.cfg" - cp openmw-cs.cfg $BUILD_CONFIG/openmw-cs.cfg - echo " settings-default.cfg" - cp settings-default.cfg $BUILD_CONFIG/settings-default.cfg - echo " resources/" - cp -r resources $BUILD_CONFIG/resources - echo -fi - exit $RET diff --git a/CMakeLists.txt b/CMakeLists.txt index 50c0d5455..2bf2896da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -313,27 +313,27 @@ endif (APPLE) # Other files -configure_file(${OpenMW_SOURCE_DIR}/files/settings-default.cfg - "${OpenMW_BINARY_DIR}/settings-default.cfg") +configure_resource_file(${OpenMW_SOURCE_DIR}/files/settings-default.cfg + "${OpenMW_BINARY_DIR}" "settings-default.cfg") if (NOT APPLE) - configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local - "${OpenMW_BINARY_DIR}/openmw.cfg") - configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg - "${OpenMW_BINARY_DIR}/openmw.cfg.install") + configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local + "${OpenMW_BINARY_DIR}" "openmw.cfg") + configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg + "${OpenMW_BINARY_DIR}" "openmw.cfg.install") else () configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg "${OpenMW_BINARY_DIR}/openmw.cfg") endif () -configure_file(${OpenMW_SOURCE_DIR}/files/openmw-cs.cfg - "${OpenMW_BINARY_DIR}/openmw-cs.cfg") +configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw-cs.cfg + "${OpenMW_BINARY_DIR}" "openmw-cs.cfg") -configure_file(${OpenMW_SOURCE_DIR}/files/opencs/defaultfilters - "${OpenMW_BINARY_DIR}/resources/defaultfilters" COPYONLY) +configure_resource_file(${OpenMW_SOURCE_DIR}/files/opencs/defaultfilters + "${OpenMW_BINARY_DIR}" "resources/defaultfilters" COPYONLY) -configure_file(${OpenMW_SOURCE_DIR}/files/gamecontrollerdb.txt - "${OpenMW_BINARY_DIR}/gamecontrollerdb.txt") +configure_resource_file(${OpenMW_SOURCE_DIR}/files/gamecontrollerdb.txt + "${OpenMW_BINARY_DIR}" "gamecontrollerdb.txt") if (NOT WIN32 AND NOT APPLE) configure_file(${OpenMW_SOURCE_DIR}/files/openmw.desktop diff --git a/cmake/GitVersion.cmake b/cmake/GitVersion.cmake index 32abbbfbf..0eefe01e6 100644 --- a/cmake/GitVersion.cmake +++ b/cmake/GitVersion.cmake @@ -26,4 +26,20 @@ else () message(WARNING "Failed to get valid version information from Git") endif () -configure_file(${VERSION_IN_FILE} ${VERSION_FILE}) +# duplicated from OpenMWMacros.cmake +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) +endmacro (configure_resource_file) + +message(STATUS ${VERSION_IN_FILE}) +message(STATUS ${VERSION_FILE_PATH_BASE}) +message(STATUS ${VERSION_FILE_PATH_RELATIVE}) + +configure_resource_file(${VERSION_IN_FILE} ${VERSION_FILE_PATH_BASE} ${VERSION_FILE_PATH_RELATIVE}) diff --git a/cmake/OpenMWMacros.cmake b/cmake/OpenMWMacros.cmake index 6573265bd..08b36017b 100644 --- a/cmake/OpenMWMacros.cmake +++ b/cmake/OpenMWMacros.cmake @@ -171,3 +171,32 @@ 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 (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) +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) +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_files) \ No newline at end of file diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 88de17903..bb22e047c 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -2,22 +2,25 @@ project (Components) # Version file set (VERSION_IN_FILE "${OpenMW_SOURCE_DIR}/files/version.in") -set (VERSION_FILE "${OpenMW_BINARY_DIR}/resources/version") +set (VERSION_FILE_PATH_BASE "${OpenMW_BINARY_DIR}") +set (VERSION_FILE_PATH_RELATIVE resources/version) if (GIT_CHECKOUT) add_custom_target (git-version COMMAND ${CMAKE_COMMAND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} -DVERSION_IN_FILE=${VERSION_IN_FILE} - -DVERSION_FILE=${VERSION_FILE} + -DVERSION_FILE_PATH_BASE=${VERSION_FILE_PATH_BASE} + -DVERSION_FILE_PATH_RELATIVE=${VERSION_FILE_PATH_RELATIVE} -DOPENMW_VERSION_MAJOR=${OPENMW_VERSION_MAJOR} -DOPENMW_VERSION_MINOR=${OPENMW_VERSION_MINOR} -DOPENMW_VERSION_RELEASE=${OPENMW_VERSION_RELEASE} -DOPENMW_VERSION=${OPENMW_VERSION} + -DMSVC=${MSVC} -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/GitVersion.cmake VERBATIM) else (GIT_CHECKOUT) - configure_file(${VERSION_IN_FILE} ${VERSION_FILE}) + configure_resource_file(${VERSION_IN_FILE} ${VERSION_FILE_PATH_BASE} ${VERSION_FILE_PATH_RELATIVE}) endif (GIT_CHECKOUT) if (OPENGL_ES) diff --git a/files/mygui/CMakeLists.txt b/files/mygui/CMakeLists.txt index ed673c5d6..49b833e38 100644 --- a/files/mygui/CMakeLists.txt +++ b/files/mygui/CMakeLists.txt @@ -4,7 +4,7 @@ endif() # Copy resource files into the build directory set(SDIR ${CMAKE_CURRENT_SOURCE_DIR}) -set(DDIR ${OPENMW_MYGUI_FILES_ROOT}/resources/mygui) +set(DDIRRELATIVE resources/mygui) set(MYGUI_FILES core.skin @@ -97,4 +97,4 @@ set(MYGUI_FILES ) -copy_all_files(${CMAKE_CURRENT_SOURCE_DIR} ${DDIR} "${MYGUI_FILES}") +copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_MYGUI_FILES_ROOT} ${DDIRRELATIVE} "${MYGUI_FILES}") diff --git a/files/shaders/CMakeLists.txt b/files/shaders/CMakeLists.txt index 5ca0d1e83..5833a592f 100644 --- a/files/shaders/CMakeLists.txt +++ b/files/shaders/CMakeLists.txt @@ -4,7 +4,7 @@ endif() # Copy resource files into the build directory set(SDIR ${CMAKE_CURRENT_SOURCE_DIR}) -set(DDIR ${OPENMW_SHADERS_ROOT}/resources/shaders) +set(DDIRRELATIVE resources/shaders) set(SHADER_FILES water_vertex.glsl @@ -18,4 +18,4 @@ set(SHADER_FILES parallax.glsl ) -copy_all_files(${CMAKE_CURRENT_SOURCE_DIR} ${DDIR} "${SHADER_FILES}") +copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_SHADERS_ROOT} ${DDIRRELATIVE} "${SHADER_FILES}") From 5ceaaabeb2c8a448cd220e06c6f39c121fbc381e Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Wed, 11 Oct 2017 22:08:49 +0100 Subject: [PATCH 02/10] Remove MESSAGE calls I accidentally left in --- cmake/GitVersion.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmake/GitVersion.cmake b/cmake/GitVersion.cmake index 0eefe01e6..786ac23ed 100644 --- a/cmake/GitVersion.cmake +++ b/cmake/GitVersion.cmake @@ -38,8 +38,4 @@ macro (configure_resource_file source_path destination_dir_base dest_path_relati endif (MSVC) endmacro (configure_resource_file) -message(STATUS ${VERSION_IN_FILE}) -message(STATUS ${VERSION_FILE_PATH_BASE}) -message(STATUS ${VERSION_FILE_PATH_RELATIVE}) - configure_resource_file(${VERSION_IN_FILE} ${VERSION_FILE_PATH_BASE} ${VERSION_FILE_PATH_RELATIVE}) From 2652a89df4425017b7d1a62a4bf9ce493a8d7282 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Wed, 11 Oct 2017 22:10:52 +0100 Subject: [PATCH 03/10] Fix mismatched indentation that apparently the .editorconfig file doesn't handle automatically --- components/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index bb22e047c..a8b7f1fd2 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -16,7 +16,7 @@ if (GIT_CHECKOUT) -DOPENMW_VERSION_MINOR=${OPENMW_VERSION_MINOR} -DOPENMW_VERSION_RELEASE=${OPENMW_VERSION_RELEASE} -DOPENMW_VERSION=${OPENMW_VERSION} - -DMSVC=${MSVC} + -DMSVC=${MSVC} -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/GitVersion.cmake VERBATIM) else (GIT_CHECKOUT) From f9a3562ccdec731e560d59e4a9f8844b0ed7584a Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Thu, 12 Oct 2017 02:45:50 +0100 Subject: [PATCH 04/10] Remove duplicate macro definition and fix warning --- cmake/GitVersion.cmake | 12 +----------- cmake/OpenMWMacros.cmake | 2 +- components/CMakeLists.txt | 1 + 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/cmake/GitVersion.cmake b/cmake/GitVersion.cmake index 786ac23ed..ff719d72a 100644 --- a/cmake/GitVersion.cmake +++ b/cmake/GitVersion.cmake @@ -26,16 +26,6 @@ else () message(WARNING "Failed to get valid version information from Git") endif () -# duplicated from OpenMWMacros.cmake -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) -endmacro (configure_resource_file) +include(${MACROSFILE}) configure_resource_file(${VERSION_IN_FILE} ${VERSION_FILE_PATH_BASE} ${VERSION_FILE_PATH_RELATIVE}) diff --git a/cmake/OpenMWMacros.cmake b/cmake/OpenMWMacros.cmake index 08b36017b..aac38a7f6 100644 --- a/cmake/OpenMWMacros.cmake +++ b/cmake/OpenMWMacros.cmake @@ -199,4 +199,4 @@ macro (copy_all_resource_files source_dir destination_dir_base destination_dir_r get_filename_component(filename ${f} NAME) copy_resource_file("${source_dir}/${f}" "${destination_dir_base}" "${destination_dir_relative}/${filename}") endforeach (f) -endmacro (copy_all_files) \ No newline at end of file +endmacro (copy_all_resource_files) \ No newline at end of file diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index a8b7f1fd2..b8ade0a67 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -17,6 +17,7 @@ if (GIT_CHECKOUT) -DOPENMW_VERSION_RELEASE=${OPENMW_VERSION_RELEASE} -DOPENMW_VERSION=${OPENMW_VERSION} -DMSVC=${MSVC} + -DMACROSFILE=${CMAKE_SOURCE_DIR}/cmake/OpenMWMacros.cmake -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/GitVersion.cmake VERBATIM) else (GIT_CHECKOUT) From b00b94f0dbefa99d42f861bf691125c4255f62fd Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Thu, 12 Oct 2017 15:40:37 +0100 Subject: [PATCH 05/10] Use CMAKE_CONFIGURATION_TYPES instead of manually listing the possible configuration types. --- cmake/OpenMWMacros.cmake | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/cmake/OpenMWMacros.cmake b/cmake/OpenMWMacros.cmake index aac38a7f6..ed1023c5d 100644 --- a/cmake/OpenMWMacros.cmake +++ b/cmake/OpenMWMacros.cmake @@ -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) From 1f86fa3c3183255833cb81bcd95f7e7a3e3e4967 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Thu, 12 Oct 2017 17:09:01 +0100 Subject: [PATCH 06/10] Fix resource copying on non-MSVC targets --- cmake/OpenMWMacros.cmake | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/cmake/OpenMWMacros.cmake b/cmake/OpenMWMacros.cmake index ed1023c5d..5e6efaa0f 100644 --- a/cmake/OpenMWMacros.cmake +++ b/cmake/OpenMWMacros.cmake @@ -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) From 76c4ff983af0d043845719f5d333c92584d295cf Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Thu, 12 Oct 2017 17:17:25 +0100 Subject: [PATCH 07/10] Fix getting cmake property as variable --- cmake/OpenMWMacros.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/OpenMWMacros.cmake b/cmake/OpenMWMacros.cmake index 5e6efaa0f..18b410d3e 100644 --- a/cmake/OpenMWMacros.cmake +++ b/cmake/OpenMWMacros.cmake @@ -174,10 +174,10 @@ 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}) + 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)) + 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) From 6af8ad70a53629c88ce7046cb6dc5e124091b3a0 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Thu, 12 Oct 2017 17:50:20 +0100 Subject: [PATCH 08/10] Remove superfluous copy_all_files macro --- cmake/OpenMWMacros.cmake | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cmake/OpenMWMacros.cmake b/cmake/OpenMWMacros.cmake index 18b410d3e..c3ba197e4 100644 --- a/cmake/OpenMWMacros.cmake +++ b/cmake/OpenMWMacros.cmake @@ -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) From a52c485090998af0f669f717ffe7b470d5ba9f6c Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Thu, 12 Oct 2017 18:16:10 +0100 Subject: [PATCH 09/10] Fix list length error --- cmake/OpenMWMacros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenMWMacros.cmake b/cmake/OpenMWMacros.cmake index c3ba197e4..5f66705e7 100644 --- a/cmake/OpenMWMacros.cmake +++ b/cmake/OpenMWMacros.cmake @@ -169,7 +169,7 @@ 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}) + 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) From c9e86a8ebc5bed5492ec0df46e1940c4821a28c9 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Thu, 12 Oct 2017 18:16:44 +0100 Subject: [PATCH 10/10] Remove superfluous argument --- components/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index b8ade0a67..e9b992e02 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -16,7 +16,6 @@ if (GIT_CHECKOUT) -DOPENMW_VERSION_MINOR=${OPENMW_VERSION_MINOR} -DOPENMW_VERSION_RELEASE=${OPENMW_VERSION_RELEASE} -DOPENMW_VERSION=${OPENMW_VERSION} - -DMSVC=${MSVC} -DMACROSFILE=${CMAKE_SOURCE_DIR}/cmake/OpenMWMacros.cmake -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/GitVersion.cmake VERBATIM)