From 5758769ad3c892782fb8f7fbbe733f1ddbf0cdc3 Mon Sep 17 00:00:00 2001 From: TheMarpe Date: Fri, 25 Nov 2022 04:51:55 +0100 Subject: [PATCH] Windows CMake directory install fix (#1434) * Fixed install convention pre 3.25 * Simplified CMAKEDIR installation directory --- CMakeLists.txt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e526a0..709390a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,15 +221,8 @@ target_compile_definitions(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC} $<$:CPPHTTPLIB_OPENSSL_SUPPORT> ) -# Cmake's find_package search path is different based on the system -# See https://cmake.org/cmake/help/latest/command/find_package.html for the list -if(CMAKE_SYSTEM_NAME STREQUAL "Windows") - set(_TARGET_INSTALL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/cmake/${PROJECT_NAME}") -else() - # On Non-Windows, it should be /usr/lib/cmake//Config.cmake - # NOTE: This may or may not work for macOS... - set(_TARGET_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") -endif() +# CMake configuration files installation directory +set(_TARGET_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") include(CMakePackageConfigHelpers)