Skip to content

Commit 5758769

Browse files
authored
Windows CMake directory install fix (#1434)
* Fixed install convention pre 3.25 * Simplified CMAKEDIR installation directory
1 parent e7eadc3 commit 5758769

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

CMakeLists.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,8 @@ target_compile_definitions(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC}
221221
$<$<BOOL:${HTTPLIB_IS_USING_OPENSSL}>:CPPHTTPLIB_OPENSSL_SUPPORT>
222222
)
223223

224-
# Cmake's find_package search path is different based on the system
225-
# See https://cmake.org/cmake/help/latest/command/find_package.html for the list
226-
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
227-
set(_TARGET_INSTALL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/cmake/${PROJECT_NAME}")
228-
else()
229-
# On Non-Windows, it should be /usr/lib/cmake/<name>/<name>Config.cmake
230-
# NOTE: This may or may not work for macOS...
231-
set(_TARGET_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
232-
endif()
224+
# CMake configuration files installation directory
225+
set(_TARGET_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
233226

234227
include(CMakePackageConfigHelpers)
235228

0 commit comments

Comments
 (0)