From e978c975b09d2078aa41b6048e225010cdb79b3c Mon Sep 17 00:00:00 2001 From: modeco80 Date: Fri, 17 Jan 2025 22:31:15 -0500 Subject: [PATCH] cmake: Support installation of libeuropa (runtime) and tools also, might as well. --- CMakeLists.txt | 2 ++ src/libeuropa/CMakeLists.txt | 8 +++++++- src/tools/eupak/CMakeLists.txt | 6 +++++- src/tools/eutex/CMakeLists.txt | 6 +++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f7ef42..6215b68 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,8 @@ include(CompilerFlags) include(FetchContent) +include(GNUInstallDirs) + # declare dependencies FetchContent_Declare(indicators GIT_REPOSITORY https://github.com/p-ranav/indicators.git diff --git a/src/libeuropa/CMakeLists.txt b/src/libeuropa/CMakeLists.txt index 2dfd9bf..1aea665 100644 --- a/src/libeuropa/CMakeLists.txt +++ b/src/libeuropa/CMakeLists.txt @@ -33,4 +33,10 @@ target_include_directories(europa PUBLIC ${PROJECT_SOURCE_DIR}/include) target_compile_features(europa PUBLIC cxx_std_20) # SOversion for *ix. -set_target_properties(europa PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION 0) \ No newline at end of file +set_target_properties(europa PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION 0) + +install(TARGETS europa + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) \ No newline at end of file diff --git a/src/tools/eupak/CMakeLists.txt b/src/tools/eupak/CMakeLists.txt index 066446d..90bc110 100644 --- a/src/tools/eupak/CMakeLists.txt +++ b/src/tools/eupak/CMakeLists.txt @@ -29,4 +29,8 @@ configure_file(EupakConfig.hpp.in target_include_directories(eupak PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_include_directories(eupak PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -europa_target(eupak) \ No newline at end of file +europa_target(eupak) + +install(TARGETS eupak + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) \ No newline at end of file diff --git a/src/tools/eutex/CMakeLists.txt b/src/tools/eutex/CMakeLists.txt index 71d4165..92dd77c 100644 --- a/src/tools/eutex/CMakeLists.txt +++ b/src/tools/eutex/CMakeLists.txt @@ -26,4 +26,8 @@ configure_file(EutexConfig.hpp.in target_include_directories(eutex PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_include_directories(eutex PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -europa_target(eutex) \ No newline at end of file +europa_target(eutex) + +install(TARGETS eutex + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) \ No newline at end of file