diff options
author | Oleg Morozenkov <m@oleg.rocks> | 2020-03-11 21:34:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-11 21:34:22 +0300 |
commit | 2237d1413ac87d88951763ad880d9e0b758fdd74 (patch) | |
tree | 9c4ba7ac1faa65d21ae27a42c0610dc647bbb6b9 | |
parent | ff8457e43a5dde35f5f56bc003a08a2b3eb50abd (diff) | |
parent | e591c3687b4d6bf9b50cd960ba9bcad252efad9a (diff) |
Merge pull request #123 from xvitaly/fix-cmake
Fixed installation on other than Ubuntu GNU/Linux distributions
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 606c7de..12d58ca 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) # ABI version |