From d481edb3619e251285c238c05f47a121ecd96df7 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 12 Nov 2022 13:43:34 +0100 Subject: cmake: add targets for loader, serialize, draw --- editor/CMakeLists.txt | 10 +++------- editor/app.cpp | 2 +- editor/editor.cpp | 2 +- editor/precomp.hpp | 2 -- editor/scenery-editor.cpp | 2 +- editor/tile-editor.cpp | 2 +- 6 files changed, 7 insertions(+), 13 deletions(-) (limited to 'editor') diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt index b420aa9c..2b42e15d 100644 --- a/editor/CMakeLists.txt +++ b/editor/CMakeLists.txt @@ -1,6 +1,6 @@ -set(self ${PROJECT_NAME}-editor) +set(self floormat-editor) -file(GLOB sources "*.cpp" "../loader/*.cpp" CONFIGURE_ARGS) +file(GLOB sources "*.cpp" CONFIGURE_ARGS) corrade_add_resource(res "../resources.conf") if(MSVC) @@ -9,14 +9,10 @@ else() set_property(SOURCE "${res}" APPEND PROPERTY COMPILE_OPTIONS "-w") endif() -if(WIN32) - link_libraries(ntdll) -endif() - link_libraries(MagnumIntegration::ImGui fmt::fmt) +link_libraries(floormat-main floormat-loader floormat-serialize) add_executable(${self} "${sources}" "${res}") -target_link_libraries(${self} ${PROJECT_NAME}-main) if(FLOORMAT_PRECOMPILED-HEADERS) target_precompile_headers(${self} PRIVATE precomp.hpp) diff --git a/editor/app.cpp b/editor/app.cpp index e9497520..986f6102 100644 --- a/editor/app.cpp +++ b/editor/app.cpp @@ -2,7 +2,7 @@ #include "compat/assert.hpp" #include "floormat/main.hpp" #include "floormat/settings.hpp" -#include "src/loader.hpp" +#include "loader/loader.hpp" #include "world.hpp" #include "src/anim-atlas.hpp" #include diff --git a/editor/editor.cpp b/editor/editor.cpp index e2690101..1ac4a887 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -1,5 +1,5 @@ #include "editor.hpp" -#include "src/loader.hpp" +#include "loader/loader.hpp" #include "tile-atlas.hpp" #include "src/world.hpp" #include "keys.hpp" diff --git a/editor/precomp.hpp b/editor/precomp.hpp index 27d0f317..775f59e7 100644 --- a/editor/precomp.hpp +++ b/editor/precomp.hpp @@ -9,8 +9,6 @@ #include #include - -#include #include #if __has_include() diff --git a/editor/scenery-editor.cpp b/editor/scenery-editor.cpp index a3560d2f..1f2fabf3 100644 --- a/editor/scenery-editor.cpp +++ b/editor/scenery-editor.cpp @@ -1,6 +1,6 @@ #include "scenery-editor.hpp" #include "src/anim-atlas.hpp" -#include "src/loader.hpp" +#include "loader/loader.hpp" #include "compat/assert.hpp" namespace floormat { diff --git a/editor/tile-editor.cpp b/editor/tile-editor.cpp index 506cf9f3..e1661c64 100644 --- a/editor/tile-editor.cpp +++ b/editor/tile-editor.cpp @@ -2,7 +2,7 @@ #include "tile-atlas.hpp" #include "world.hpp" #include "keys.hpp" -#include "loader.hpp" +#include "loader/loader.hpp" #include "random.hpp" #include "serialize/json-helper.hpp" #include "serialize/tile-atlas.hpp" -- cgit v1.2.3