From bd4301b2c168bb9f8f123031fe13cf1d571a791b Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 17 Sep 2019 14:45:59 -0230 Subject: [PATCH 1/2] added arch_independent option --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bfdc8df7..6f1fac76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright(c) 2019 spdlog authors # Distributed under the MIT License (http://opensource.org/licenses/MIT) -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.14) #--------------------------------------------------------------------------------------- # Start spdlog project @@ -197,7 +197,7 @@ if (SPDLOG_INSTALL) include(CMakePackageConfigHelpers) configure_file("${project_config_in}" "${project_config_out}" @ONLY) - write_basic_package_version_file("${version_config_file}" COMPATIBILITY SameMajorVersion) + write_basic_package_version_file("${version_config_file}" COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT) install(FILES "${project_config_out}" "${version_config_file}" DESTINATION "${export_dest_dir}") From c87882e82fbb35a8fd24c7040421e53b49f70643 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 18 Sep 2019 09:20:01 -0230 Subject: [PATCH 2/2] added version check --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f1fac76..d9576f4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,7 +197,11 @@ if (SPDLOG_INSTALL) include(CMakePackageConfigHelpers) configure_file("${project_config_in}" "${project_config_out}" @ONLY) - write_basic_package_version_file("${version_config_file}" COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT) + if(${CMAKE_VERSION} VERSION_GREATER 3.13) + write_basic_package_version_file("${version_config_file}" COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT) + else() + write_basic_package_version_file("${version_config_file}" COMPATIBILITY SameMajorVersion) + endif() install(FILES "${project_config_out}" "${version_config_file}" DESTINATION "${export_dest_dir}")