diff options
author | Aki <please@ignore.pl> | 2023-02-27 22:10:48 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-02-27 22:10:48 +0100 |
commit | eb7b5585447d67099a1fc8382a0f05b07b609b49 (patch) | |
tree | 52cc59aeab8cdf18c1074c4e7a8017d2a1ce6ef8 | |
parent | a471d2e3535482f3a49262db52dbbf85078f5bcf (diff) | |
download | kurator-eb7b5585447d67099a1fc8382a0f05b07b609b49.zip kurator-eb7b5585447d67099a1fc8382a0f05b07b609b49.tar.gz kurator-eb7b5585447d67099a1fc8382a0f05b07b609b49.tar.bz2 |
Added install targets for executable and resources
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | cmake/modules/AddResources.cmake | 2 | ||||
-rw-r--r-- | kurator/CMakeLists.txt | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index da56f8d..bebfbbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_EXTENSIONS No) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -D_USE_MATH_DEFINES") set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") +set(CMAKE_INSTALL_BINDIR .) enable_testing() find_package(EnTT 3 REQUIRED) find_package(GTest 1 REQUIRED) diff --git a/cmake/modules/AddResources.cmake b/cmake/modules/AddResources.cmake index b59258e..227e710 100644 --- a/cmake/modules/AddResources.cmake +++ b/cmake/modules/AddResources.cmake @@ -19,6 +19,8 @@ function(add_resources RESOURCES_TARGET) "${RESOURCES_PREFIX}/${RESOURCES_SOURCE}" COMMENT "Moving ${RESOURCES_SOURCE}" ) + cmake_path(GET RESOURCES_SOURCE PARENT_PATH PARENT) + install(FILES ${RESOURCES_SOURCE} DESTINATION ${PARENT}) endforeach() list(TRANSFORM RESOURCES_FILES PREPEND "${RESOURCES_PREFIX}/") add_custom_target( diff --git a/kurator/CMakeLists.txt b/kurator/CMakeLists.txt index b97a8b5..1465ba3 100644 --- a/kurator/CMakeLists.txt +++ b/kurator/CMakeLists.txt @@ -36,3 +36,4 @@ target_sources( ${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/version.cpp" ) +install(TARGETS ${PROJECT_NAME} RUNTIME) |