From 01cfba2d94df2a2e1b1ef364c790773434d83eda Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Sat, 18 Aug 2018 14:59:38 +0200 Subject: [PATCH 1/2] Fix default installation path --- Release/CMakeLists.txt | 2 +- Release/src/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Release/CMakeLists.txt b/Release/CMakeLists.txt index 3b99b85309..0b33e91902 100644 --- a/Release/CMakeLists.txt +++ b/Release/CMakeLists.txt @@ -18,7 +18,7 @@ enable_testing() set(WERROR ON CACHE BOOL "Treat Warnings as Errors.") set(CPPREST_EXCLUDE_WEBSOCKETS OFF CACHE BOOL "Exclude websockets functionality.") set(CPPREST_EXCLUDE_COMPRESSION OFF CACHE BOOL "Exclude compression functionality.") -set(CPPREST_EXPORT_DIR lib/cpprestsdk CACHE STRING "Directory to install CMake config files.") +set(CPPREST_EXPORT_DIR cmake CACHE STRING "Directory to install CMake config files.") set(CPPREST_INSTALL_HEADERS ON CACHE BOOL "Install header files.") set(CPPREST_INSTALL ON CACHE BOOL "Add install commands.") diff --git a/Release/src/CMakeLists.txt b/Release/src/CMakeLists.txt index a34605bda2..050ff71fc2 100644 --- a/Release/src/CMakeLists.txt +++ b/Release/src/CMakeLists.txt @@ -262,12 +262,12 @@ if(CPPREST_INSTALL) install( FILES "${CMAKE_CURRENT_BINARY_DIR}/cpprestsdk-config.cmake" - DESTINATION ${CPPREST_EXPORT_DIR} + DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CPPREST_EXPORT_DIR} ) install( EXPORT cpprestsdk-targets FILE cpprestsdk-targets.cmake NAMESPACE cpprestsdk:: - DESTINATION ${CPPREST_EXPORT_DIR} + DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CPPREST_EXPORT_DIR} ) endif() From 03b95559cf62ca76cbc62986b392b6118762a64b Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Mon, 20 Aug 2018 19:26:00 +0200 Subject: [PATCH 2/2] Fixup previous commit. This makes the install location not correct for Debian and similar linux distro, but upstream don't plan to change "lib/cpprestsdk" location, so at least we can override the location with -DCPPREST_EXPORT_DIR=cmake and keep the CMAKE_INSTALL_LIBDIR multiarch location --- Release/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Release/CMakeLists.txt b/Release/CMakeLists.txt index 0b33e91902..563b13d0dc 100644 --- a/Release/CMakeLists.txt +++ b/Release/CMakeLists.txt @@ -18,7 +18,7 @@ enable_testing() set(WERROR ON CACHE BOOL "Treat Warnings as Errors.") set(CPPREST_EXCLUDE_WEBSOCKETS OFF CACHE BOOL "Exclude websockets functionality.") set(CPPREST_EXCLUDE_COMPRESSION OFF CACHE BOOL "Exclude compression functionality.") -set(CPPREST_EXPORT_DIR cmake CACHE STRING "Directory to install CMake config files.") +set(CPPREST_EXPORT_DIR cpprestsdk CACHE STRING "Directory to install CMake config files.") set(CPPREST_INSTALL_HEADERS ON CACHE BOOL "Install header files.") set(CPPREST_INSTALL ON CACHE BOOL "Add install commands.")