Use CMAKE_INSTALL_* variables when installing in CMake.

Closes #1049. Thanks to Greg Troxel.
This commit is contained in:
Roger A. Light
2019-04-26 17:07:05 +01:00
parent efa649f451
commit 439575475c
7 changed files with 23 additions and 45 deletions
+3 -3
View File
@@ -13,7 +13,7 @@ set_target_properties(mosquittopp PROPERTIES
VERSION ${VERSION}
SOVERSION 1
)
install(TARGETS mosquittopp RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}")
install(TARGETS mosquittopp LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
if (WITH_STATIC_LIBRARIES)
add_library(mosquittopp_static STATIC
@@ -34,7 +34,7 @@ if (WITH_STATIC_LIBRARIES)
)
target_compile_definitions(mosquittopp_static PUBLIC "LIBMOSQUITTO_STATIC")
install(TARGETS mosquittopp_static RUNTIME DESTINATION "${BINDIR}" ARCHIVE DESTINATION "${LIBDIR}")
install(TARGETS mosquittopp_static ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
endif (WITH_STATIC_LIBRARIES)
install(FILES mosquittopp.h DESTINATION "${INCLUDEDIR}")
install(FILES mosquittopp.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")