Skip to content

Commit

Permalink
Update CMakeLists.txt to install the cmake bindings in the right loca…
Browse files Browse the repository at this point in the history
…tion (#737)

* Update CMakeLists.txt to install the cmake bindings in the right location

/usr/lib/cpprestsdk is not the correct FHS standard cmake location.
It should be placed in /usr/lib/<triplet>/cmake/cpprestsdk instead.

Same goes for libraries, support multiarch location if we use UNIX

* Revert changes to CPPREST_EXPORT_DIR. Use GNUInstallDirs on all platforms.
  • Loading branch information
LocutusOfBorg authored and ras0219-msft committed Aug 3, 2018
1 parent 5021303 commit ecabd2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Release/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ include(cmake/cpprest_find_zlib.cmake)
include(cmake/cpprest_find_openssl.cmake)
include(cmake/cpprest_find_websocketpp.cmake)
include(CheckIncludeFiles)
include(GNUInstallDirs)

find_package(Threads REQUIRED)
if(THREADS_HAVE_PTHREAD_ARG)
Expand Down
6 changes: 3 additions & 3 deletions Release/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ if(CPPREST_INSTALL)
install(
TARGETS ${CPPREST_TARGETS}
EXPORT cpprestsdk-targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

configure_file(../cmake/cpprestsdk-config.in.cmake "${CMAKE_CURRENT_BINARY_DIR}/cpprestsdk-config.cmake" @ONLY)
Expand Down

0 comments on commit ecabd2b

Please sign in to comment.