From e591c3687b4d6bf9b50cd960ba9bcad252efad9a Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Mon, 6 Jan 2020 13:52:17 +0100 Subject: Fixed installation on other than Ubuntu GNU/Linux distributions. Signed-off-by: Vitaly Zaitsev --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1759746..6fd8ce2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,11 +68,12 @@ set(LIB_LIST add_library(${PROJECT_NAME} ${SRC_LIST}) target_include_directories(${PROJECT_NAME} PUBLIC include) target_link_libraries(${PROJECT_NAME} ${LIB_LIST}) +include(GNUInstallDirs) install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -install(DIRECTORY include/ DESTINATION include) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON) # tests -- cgit v1.2.3