Skip to content

Commit ecabd2b

Browse files
LocutusOfBorgras0219-msft
authored andcommitted
Update CMakeLists.txt to install the cmake bindings in the right location (#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.
1 parent 5021303 commit ecabd2b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Release/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ include(cmake/cpprest_find_zlib.cmake)
6363
include(cmake/cpprest_find_openssl.cmake)
6464
include(cmake/cpprest_find_websocketpp.cmake)
6565
include(CheckIncludeFiles)
66+
include(GNUInstallDirs)
6667

6768
find_package(Threads REQUIRED)
6869
if(THREADS_HAVE_PTHREAD_ARG)

Release/src/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@ if(CPPREST_INSTALL)
253253
install(
254254
TARGETS ${CPPREST_TARGETS}
255255
EXPORT cpprestsdk-targets
256-
RUNTIME DESTINATION bin
257-
LIBRARY DESTINATION lib
258-
ARCHIVE DESTINATION lib
256+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
257+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
258+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
259259
)
260260

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

0 commit comments

Comments
 (0)