summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVitaly Zaitsev <vitaly@easycoding.org>2020-01-06 13:52:17 +0100
committerVitaly Zaitsev <vitaly@easycoding.org>2020-01-06 13:52:17 +0100
commite591c3687b4d6bf9b50cd960ba9bcad252efad9a (patch)
treeffee095ac5ec91ffc954f52289b8664017a3379d /CMakeLists.txt
parent2e4544a1f9aab5994ca81a6d95bd9fe3436d7a31 (diff)
Fixed installation on other than Ubuntu GNU/Linux distributions.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
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