From f9a3562ccdec731e560d59e4a9f8844b0ed7584a Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Thu, 12 Oct 2017 02:45:50 +0100 Subject: [PATCH] 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)