Skip to content

Commit 632d52f

Browse files
committed
src: set destination library to ${CMAKE_INSTALL_LIBDIR}
This is already the case in the paho-c library project. Signed-off-by: Julien Courtat <[email protected]>
1 parent 1657348 commit 632d52f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ set(CPACK_PACKAGE_VERSION_MAJOR ${PAHO_VERSION_MAJOR})
4545
set(CPACK_PACKAGE_VERSION_MINOR ${PAHO_VERSION_MINOR})
4646
set(CPACK_PACKAGE_VERSION_PATCH ${PAHO_VERSION_PATCH})
4747

48+
INCLUDE(GNUInstallDirs)
49+
4850
## --- Build options ---
4951

5052
if(WIN32)

src/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ if(PAHO_BUILD_SHARED)
7979

8080
## install the shared library
8181
install(TARGETS ${PAHO_MQTT_CPP}
82-
ARCHIVE DESTINATION lib
83-
LIBRARY DESTINATION lib
84-
RUNTIME DESTINATION bin)
82+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
83+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
84+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
8585
endif()
8686

8787
## --- Build static version of the library, if requested ---
@@ -95,8 +95,8 @@ if(PAHO_BUILD_STATIC)
9595

9696
## install the static library
9797
install(TARGETS ${PAHO_MQTT_CPP_STATIC}
98-
ARCHIVE DESTINATION lib
99-
LIBRARY DESTINATION lib)
98+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
99+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
100100

101101
## Static lib has same name as shared lib
102102
set_target_properties(${PAHO_MQTT_CPP_STATIC} PROPERTIES OUTPUT_NAME ${PAHO_MQTT_CPP})

0 commit comments

Comments
 (0)