From b99823296da5734fef1c6146030afd6dc81dbcc8 Mon Sep 17 00:00:00 2001 From: Felix Wang <77263945+topazus@users.noreply.github.com> Date: Tue, 25 Apr 2023 20:05:14 +0800 Subject: [PATCH] Use ARCH_INDEPENDENT option that is introduced in CMake 3.14 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c8d4b7a..925165e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,10 +27,15 @@ if(UTF8_INSTALL) set(DEF_INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/utf8cpp) endif() + if(${CMAKE_VERSION} VERSION_GREATER "3.14") + set(OPTIONAL_ARCH_INDEPENDENT "ARCH_INDEPENDENT") + endif() + write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/utf8cppConfigVersion.cmake VERSION ${PROJECT_VERSION} COMPATIBILITY SameMajorVersion + ${OPTIONAL_ARCH_INDEPENDENT} ) configure_package_config_file(