diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-06 09:49:23 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-06 09:57:50 +0200 |
commit | 89acc4653fe7ea3a76dd49711b3ac6b704ed509d (patch) | |
tree | dcff8947d840f50ee348e375aca311829dad2e7a | |
parent | 595c113b88dc1e81802b4b1381122f25c0eece74 (diff) |
a
-rw-r--r-- | CMakeLists.txt | 17 | ||||
-rw-r--r-- | main/CMakeLists.txt | 6 | ||||
-rw-r--r-- | serialize/tile-atlas.cpp | 2 | ||||
-rw-r--r-- | src/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/chunk.cpp (renamed from chunk.cpp) | 0 | ||||
-rw-r--r-- | src/chunk.hpp (renamed from chunk.hpp) | 0 | ||||
-rw-r--r-- | src/floor-mesh.cpp (renamed from floor-mesh.cpp) | 0 | ||||
-rw-r--r-- | src/floor-mesh.hpp (renamed from floor-mesh.hpp) | 0 | ||||
-rw-r--r-- | src/loader.cpp (renamed from loader.cpp) | 0 | ||||
-rw-r--r-- | src/loader.hpp (renamed from loader.hpp) | 0 | ||||
-rw-r--r-- | src/tile-atlas.cpp (renamed from tile-atlas.cpp) | 0 | ||||
-rw-r--r-- | src/tile-atlas.hpp (renamed from tile-atlas.hpp) | 0 | ||||
-rw-r--r-- | src/tile.cpp (renamed from tile.cpp) | 0 | ||||
-rw-r--r-- | src/tile.hpp (renamed from tile.hpp) | 0 | ||||
-rw-r--r-- | src/wall-mesh.cpp (renamed from wall-mesh.cpp) | 0 | ||||
-rw-r--r-- | src/wall-mesh.hpp (renamed from wall-mesh.hpp) | 0 |
16 files changed, 19 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dc24f387..07bb26ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,24 +56,11 @@ if(NOT BOOTSTRAP_DEPENDS) find_package(MagnumIntegration QUIET REQUIRED COMPONENTS Glm) include_directories(.) + include_directories(src) - file(GLOB sources "*.cpp" "shaders/*.cpp" "serialize/*.cpp" CONFIGURE_ARGS) - 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(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() diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index cb3b1f2c..9614e17f 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,8 +1,10 @@ set(self "${PROJECT_NAME}-main") file(GLOB sources "*.cpp" CONFIGURE_ARGS) -link_libraries(${PROJECT_NAME} - Magnum::Application Magnum::Trade MagnumIntegration::Glm) +link_libraries(${PROJECT_NAME}) +link_libraries(Magnum::Application Magnum::Trade) + corrade_add_resource(res ../resources.conf) add_executable(${self} WIN32 "${sources}" "${res}") set_property(TARGET ${self} PROPERTY OUTPUT_NAME "${PROJECT_NAME}") +install(TARGETS ${self} RUNTIME DESTINATION bin) diff --git a/serialize/tile-atlas.cpp b/serialize/tile-atlas.cpp index 4a10d2c2..1aa0c14d 100644 --- a/serialize/tile-atlas.cpp +++ b/serialize/tile-atlas.cpp @@ -1,4 +1,4 @@ -#include "../tile-atlas.hpp" +#include "src/tile-atlas.hpp" #include "serialize/tile-atlas.hpp" #include "serialize/magnum-vector.hpp" #include "loader.hpp" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 00000000..e443a9df --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,12 @@ +set(self ${PROJECT_NAME}) +file(GLOB sources "*.cpp" "../shaders/*.cpp" "../serialize/*.cpp" CONFIGURE_ARGS) +add_library(${self} STATIC "${sources}") +target_link_libraries( + ${self} PUBLIC + Magnum::GL + Magnum::Magnum + Magnum::Shaders + nlohmann_json::nlohmann_json +) +target_include_directories(${self} PRIVATE ${GLM_INCLUDE_DIRS}) +target_include_directories(${self} PRIVATE magnum-integration/src) diff --git a/chunk.cpp b/src/chunk.cpp index 221f8132..221f8132 100644 --- a/chunk.cpp +++ b/src/chunk.cpp diff --git a/chunk.hpp b/src/chunk.hpp index 829ee0d3..829ee0d3 100644 --- a/chunk.hpp +++ b/src/chunk.hpp diff --git a/floor-mesh.cpp b/src/floor-mesh.cpp index 7156661e..7156661e 100644 --- a/floor-mesh.cpp +++ b/src/floor-mesh.cpp diff --git a/floor-mesh.hpp b/src/floor-mesh.hpp index 41351fd9..41351fd9 100644 --- a/floor-mesh.hpp +++ b/src/floor-mesh.hpp diff --git a/loader.cpp b/src/loader.cpp index f6219350..f6219350 100644 --- a/loader.cpp +++ b/src/loader.cpp diff --git a/loader.hpp b/src/loader.hpp index 49299bb6..49299bb6 100644 --- a/loader.hpp +++ b/src/loader.hpp diff --git a/tile-atlas.cpp b/src/tile-atlas.cpp index d5d56cce..d5d56cce 100644 --- a/tile-atlas.cpp +++ b/src/tile-atlas.cpp diff --git a/tile-atlas.hpp b/src/tile-atlas.hpp index b32a70d8..b32a70d8 100644 --- a/tile-atlas.hpp +++ b/src/tile-atlas.hpp diff --git a/wall-mesh.cpp b/src/wall-mesh.cpp index ee998e63..ee998e63 100644 --- a/wall-mesh.cpp +++ b/src/wall-mesh.cpp diff --git a/wall-mesh.hpp b/src/wall-mesh.hpp index ce1ff30a..ce1ff30a 100644 --- a/wall-mesh.hpp +++ b/src/wall-mesh.hpp |