From a7ed093631113089662482838506e2b8572c9a37 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 4 Dec 2023 10:46:58 +0900 Subject: [PATCH] Do not install CMake config files in a different directory --- CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 04d38d8e..33487920 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,11 +66,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}" enable_testing() -if(WIN32 AND NOT CYGWIN) - set(CMAKE_CONFIG_INSTALL_DIR CMake) -else() - set(CMAKE_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake) -endif() +set(CMAKE_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake) string(REGEX REPLACE "[^/]+" ".." RELATIVE_PATH_CMAKE_DIR_TO_PREFIX "${CMAKE_CONFIG_INSTALL_DIR}") string(REGEX REPLACE "[^/]+" ".." RELATIVE_PATH_LIBDIR_TO_PREFIX "${CMAKE_INSTALL_LIBDIR}")