Skip to content

Commit

Permalink
Fix install (#879)
Browse files Browse the repository at this point in the history
* Fix default installation path

* 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
  • Loading branch information
LocutusOfBorg authored and BillyONeal committed Oct 1, 2018
1 parent b14f9ff commit f897582
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Release/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 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.")

Expand Down
4 changes: 2 additions & 2 deletions Release/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit f897582

Please sign in to comment.