summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-06 07:11:48 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-06 07:11:48 +0200
commit66ee29df9c19e35b4c126e12e48bc144fe72eb22 (patch)
treec5d8a80cb917a1e33d8efdf6ffc653694e67c759 /CMakeLists.txt
parent9b2b5c5fd5880f35e2e952bb89fc709f4b814364 (diff)
a
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt31
1 files changed, 14 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e5ef563..dc24f387 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,28 +55,25 @@ if(NOT BOOTSTRAP_DEPENDS)
find_package(MagnumPlugins QUIET REQUIRED)
find_package(MagnumIntegration QUIET REQUIRED COMPONENTS Glm)
- include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
-
include_directories(.)
- add_subdirectory(anim-crop-tool)
- add_subdirectory(serialize)
-
- corrade_add_resource(game_RESOURCES resources.conf)
file(GLOB sources "*.cpp" "shaders/*.cpp" "serialize/*.cpp" CONFIGURE_ARGS)
-
- add_executable(${PROJECT_NAME} WIN32 "${sources}" "${game_RESOURCES}")
- target_link_libraries(${PROJECT_NAME} PRIVATE
- Magnum::Application
- Magnum::GL
- Magnum::Magnum
- Magnum::Shaders
- Magnum::Trade
- MagnumIntegration::Glm
- nlohmann_json::nlohmann_json
- )
+ add_library(${PROJECT_NAME} STATIC "${sources}")
+ target_link_libraries(
+ ${PROJECT_NAME} PUBLIC
+ Magnum::GL
+ Magnum::Magnum
+ Magnum::Shaders
+ nlohmann_json::nlohmann_json
+ )
target_include_directories(${PROJECT_NAME} PRIVATE ${GLM_INCLUDE_DIRS})
target_include_directories(${PROJECT_NAME} PRIVATE magnum-integration/src)
+
+ add_subdirectory(main)
+ add_subdirectory(anim-crop-tool)
+
+ install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
+ install(DIRECTORY images DESTINATION /src)
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
install(DIRECTORY images DESTINATION "share/${PROJECT_NAME}")
endif()