diff options
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | draw/CMakeLists.txt | 2 | ||||
-rw-r--r-- | editor/CMakeLists.txt | 15 | ||||
-rw-r--r-- | editor/dummy.cc | 0 | ||||
-rw-r--r-- | main/CMakeLists.txt | 2 | ||||
-rw-r--r-- | serialize/CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/CMakeLists.txt | 18 | ||||
-rw-r--r-- | test/dummy.cc | 0 |
8 files changed, 22 insertions, 25 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b1f95fb6..744c7bfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,13 +197,13 @@ include_directories(SYSTEM ) #add_subdirectory(demangle) -add_subdirectory(src) -add_subdirectory(serialize) -add_subdirectory(anim-crop-tool) -add_subdirectory(draw) add_subdirectory(main) +add_subdirectory(draw) +add_subdirectory(serialize) +add_subdirectory(src) add_subdirectory(editor) add_subdirectory(test) +add_subdirectory(anim-crop-tool) install(DIRECTORY images anim scenery DESTINATION "share/floormat") diff --git a/draw/CMakeLists.txt b/draw/CMakeLists.txt index 027c1e24..a4be3c13 100644 --- a/draw/CMakeLists.txt +++ b/draw/CMakeLists.txt @@ -1,7 +1,7 @@ set(self floormat-draw) file(GLOB sources "*.cpp" CONFIGURE_ARGS) add_library(${self} OBJECT "${sources}") -target_link_libraries(${self} PUBLIC Magnum::GL floormat) +target_link_libraries(${self} PUBLIC Magnum::GL) if(FLOORMAT_PRECOMPILED-HEADERS) target_precompile_headers(${self} PRIVATE precomp.hpp) endif() diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt index cb57e6e1..2119ee9e 100644 --- a/editor/CMakeLists.txt +++ b/editor/CMakeLists.txt @@ -9,8 +9,8 @@ else() set_property(SOURCE "${res}" APPEND PROPERTY COMPILE_OPTIONS "-w") endif() -add_executable(${self} "${res}" "${sources}") -target_link_libraries(${self} PRIVATE MagnumIntegration::ImGui fmt::fmt nlohmann_json::nlohmann_json) +add_library(${self}_o OBJECT "${res}" "${sources}") +target_link_libraries(${self}_o PUBLIC MagnumIntegration::ImGui fmt::fmt nlohmann_json::nlohmann_json) if(NOT SDL2_INCLUDE_DIRS) if(NOT TARGET SDL2::SDL2) @@ -19,16 +19,17 @@ if(NOT SDL2_INCLUDE_DIRS) get_target_property(SDL2_INCLUDE_DIRS SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES) endif() endif() -target_include_directories(${self} SYSTEM PRIVATE "${SDL2_INCLUDE_DIRS}") - -target_link_libraries(${self} PRIVATE floormat-main floormat-serialize floormat-draw floormat) +target_include_directories(${self}_o SYSTEM PRIVATE "${SDL2_INCLUDE_DIRS}") if(WIN32) - target_sources(${self} PRIVATE "../main/floormat.rc") + target_sources(${self}_o PRIVATE "../main/floormat.rc") endif() +add_executable(${self} dummy.cc) +target_link_libraries(${self} PRIVATE ${self}_o floormat-main floormat-serialize floormat-draw floormat) + if(FLOORMAT_PRECOMPILED-HEADERS) - target_precompile_headers(${self} PRIVATE precomp.hpp) + target_precompile_headers(${self}_o PRIVATE precomp.hpp) endif() install(TARGETS ${self} RUNTIME DESTINATION bin) diff --git a/editor/dummy.cc b/editor/dummy.cc new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/editor/dummy.cc diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index d0e32491..b40015e8 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -10,8 +10,6 @@ target_link_libraries(${self} PUBLIC fmt::fmt ) -target_link_libraries(${self} PUBLIC floormat-draw floormat) - if(FLOORMAT_PRECOMPILED-HEADERS) target_precompile_headers(${self} PRIVATE precomp.hpp) endif() diff --git a/serialize/CMakeLists.txt b/serialize/CMakeLists.txt index 50f40148..1813ba90 100644 --- a/serialize/CMakeLists.txt +++ b/serialize/CMakeLists.txt @@ -13,8 +13,6 @@ if(MSVC) add_compile_options(-EHsc) endif() -target_link_libraries(${self} PUBLIC floormat) - if(WIN32 OR MAGNUM_BUILD_PLUGINS_STATIC) target_link_libraries(${self} PUBLIC MagnumPlugins::StbImageImporter diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6eea9f5f..eae3ffd5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -3,21 +3,21 @@ file(GLOB sources "*.cpp" CONFIGURE_ARGS) file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/test") -add_executable(${self} "${sources}") - -target_link_libraries(${self} PRIVATE floormat-serialize floormat) -target_link_libraries(${self} PRIVATE Magnum::GL Magnum::Trade nlohmann_json::nlohmann_json) +add_library(${self}_o OBJECT "${sources}") +target_link_libraries(${self}_o PUBLIC Magnum::GL Magnum::Trade nlohmann_json::nlohmann_json fmt::fmt) if(APPLE) - target_link_libraries(${self} PRIVATE Magnum::WindowlessCglApplication) + target_link_libraries(${self}_o PUBLIC Magnum::WindowlessCglApplication) elseif(WIN32) - target_link_libraries(${self} PRIVATE Magnum::WindowlessWglApplication) - target_link_libraries(${self} PRIVATE ntdll) + target_link_libraries(${self}_o PUBLIC Magnum::WindowlessWglApplication ntdll) else() - target_link_libraries(${self} PRIVATE Magnum::WindowlessGlxApplication) + target_link_libraries(${self}_o PUBLIC Magnum::WindowlessGlxApplication) endif() +add_executable(${self} dummy.cc) +target_link_libraries(${self} ${self}_o floormat-serialize floormat) + if(FLOORMAT_PRECOMPILED-HEADERS) - target_precompile_headers(${self} PRIVATE precomp.hpp) + target_precompile_headers(${self}_o PRIVATE precomp.hpp) endif() install(TARGETS ${self} RUNTIME DESTINATION bin) diff --git a/test/dummy.cc b/test/dummy.cc new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/dummy.cc |