diff options
-rw-r--r-- | anim-crop-tool/CMakeLists.txt | 10 | ||||
-rw-r--r-- | anim-crop-tool/dummy.cc | 0 | ||||
-rw-r--r-- | editor/CMakeLists.txt | 8 | ||||
-rw-r--r-- | loader/CMakeLists.txt | 15 | ||||
-rw-r--r-- | loader/dummy.cc | 0 | ||||
-rw-r--r-- | main/CMakeLists.txt | 13 | ||||
-rw-r--r-- | main/dummy.cc | 0 | ||||
-rw-r--r-- | serialize/CMakeLists.txt | 11 | ||||
-rw-r--r-- | serialize/dummy.cc | 0 | ||||
-rw-r--r-- | test/CMakeLists.txt | 16 | ||||
-rw-r--r-- | test/dummy.cc | 0 |
11 files changed, 46 insertions, 27 deletions
diff --git a/anim-crop-tool/CMakeLists.txt b/anim-crop-tool/CMakeLists.txt index b0fa0570..8321c0f2 100644 --- a/anim-crop-tool/CMakeLists.txt +++ b/anim-crop-tool/CMakeLists.txt @@ -2,12 +2,16 @@ find_package(OpenCV QUIET) if(OpenCV_FOUND) set(self "floormat-anim-crop-tool") - include_directories(SYSTEM PRIVATE ${OpenCV_INCLUDE_DIRS}) + include_directories(SYSTEM ${OpenCV_INCLUDE_DIRS}) link_libraries(Corrade::Utility Magnum::Magnum) link_libraries(opencv_imgproc opencv_imgcodecs opencv_core) - link_libraries(floormat-serialize floormat) + link_libraries(nlohmann_json::nlohmann_json) file(GLOB sources "*.cpp" CONFIGURE_ARGS) - add_executable(${self} ${sources}) + add_library(${self}_o STATIC "${sources}") + + add_executable(${self} dummy.cc) + target_link_libraries(${self} PUBLIC ${self}_o floormat-serialize floormat) + install(TARGETS ${self} RUNTIME DESTINATION "bin") endif() diff --git a/anim-crop-tool/dummy.cc b/anim-crop-tool/dummy.cc new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/anim-crop-tool/dummy.cc diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt index 30b6ce5a..38db2a04 100644 --- a/editor/CMakeLists.txt +++ b/editor/CMakeLists.txt @@ -9,10 +9,12 @@ else() set_property(SOURCE "${res}" APPEND PROPERTY COMPILE_OPTIONS "-w") endif() -link_libraries(MagnumIntegration::ImGui fmt::fmt) -link_libraries(floormat-main floormat-loader floormat-serialize) +add_library(${self}_o STATIC "${sources}") +target_link_libraries(${self}_o PUBLIC MagnumIntegration::ImGui SDL2::SDL2 fmt::fmt nlohmann_json::nlohmann_json) + +add_executable(${self} "${res}") +target_link_libraries(${self} PUBLIC ${self}_o floormat-main floormat-loader floormat-serialize) -add_executable(${self} "${sources}" "${res}") if(WIN32) target_sources(${self} PRIVATE "../main/floormat.rc") endif() diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index 4bba63dc..8192d541 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -1,22 +1,25 @@ set(self floormat-loader) file(GLOB sources "*.cpp" CONFIGURE_ARGS) -add_library(${self} STATIC "${sources}") +add_library(${self}_o STATIC "${sources}") target_link_libraries( - ${self} PUBLIC - floormat-serialize - floormat + ${self}_o PUBLIC Magnum::Magnum Magnum::Trade + nlohmann_json::nlohmann_json ) if(WIN32 OR MAGNUM_BUILD_PLUGINS_STATIC) - target_link_libraries(${self} PUBLIC + target_link_libraries(${self}_o PUBLIC MagnumPlugins::StbImageImporter Magnum::TgaImporter ) endif() if(WIN32) - target_link_libraries(${self} PUBLIC ntdll) + target_link_libraries(${self}_o PUBLIC ntdll) endif() + +add_library(${self} STATIC dummy.cc) +target_link_libraries(${self} PUBLIC ${self}_o floormat-serialize floormat) + if(FLOORMAT_PRECOMPILED-HEADERS) target_precompile_headers(${self} PRIVATE precomp.hpp) endif() diff --git a/loader/dummy.cc b/loader/dummy.cc new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/loader/dummy.cc diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index a84337cc..cafc5972 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,10 +1,17 @@ set(self floormat-main) file(GLOB sources "*.cpp" CONFIGURE_ARGS) -link_libraries(floormat-draw floormat) -link_libraries(Magnum::Sdl2Application Corrade::Containers Magnum::GL Magnum::Trade fmt::fmt) +add_library(${self}_o STATIC "${sources}") +target_link_libraries(${self}_o PUBLIC + Magnum::Sdl2Application + Corrade::Containers + Magnum::GL + Magnum::Trade + fmt::fmt +) -add_library(${self} STATIC "${sources}") +add_library(${self} STATIC dummy.cc) +target_link_libraries(${self} PUBLIC ${self}_o floormat-draw floormat) if(FLOORMAT_PRECOMPILED-HEADERS) target_precompile_headers(${self} PRIVATE precomp.hpp) diff --git a/main/dummy.cc b/main/dummy.cc new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/main/dummy.cc diff --git a/serialize/CMakeLists.txt b/serialize/CMakeLists.txt index 4f73f716..501dc448 100644 --- a/serialize/CMakeLists.txt +++ b/serialize/CMakeLists.txt @@ -1,15 +1,16 @@ set(self floormat-serialize) file(GLOB sources "*.cpp" CONFIGURE_ARGS) -add_library(${self} STATIC "${sources}") +add_library(${self}_o STATIC "${sources}") target_link_libraries( - ${self} PUBLIC - floormat-loader - floormat + ${self}_o PUBLIC Magnum::Magnum nlohmann_json::nlohmann_json ) +add_library(${self} STATIC dummy.cc) +target_link_libraries(${self} PUBLIC ${self}_o floormat-loader floormat) + if(FLOORMAT_PRECOMPILED-HEADERS) - target_precompile_headers(${self} PRIVATE precomp.hpp) + target_precompile_headers(${self}_o PRIVATE precomp.hpp) endif() if(MSVC) diff --git a/serialize/dummy.cc b/serialize/dummy.cc new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/serialize/dummy.cc diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d7d202dc..adcd246f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -3,19 +3,21 @@ file(GLOB sources "*.cpp" CONFIGURE_ARGS) file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/test") -link_libraries(Magnum::GL Magnum::Trade) -link_libraries(floormat-loader floormat-serialize floormat) +add_library(${self}_o STATIC ${sources}) +target_link_libraries(${self}_o PUBLIC Magnum::GL Magnum::Trade nlohmann_json::nlohmann_json) if(APPLE) - link_libraries(Magnum::WindowlessCglApplication) + target_link_libraries(${self}_o PUBLIC Magnum::WindowlessCglApplication) elseif(WIN32) - link_libraries(Magnum::WindowlessWglApplication) - link_libraries(ntdll) + target_link_libraries(${self}_o PUBLIC Magnum::WindowlessWglApplication) + target_link_libraries(${self}_o PUBLIC ntdll) else() - link_libraries(Magnum::WindowlessGlxApplication) + target_link_libraries(${self}_o PUBLIC Magnum::WindowlessGlxApplication) endif() -add_executable(${self} "${sources}") +add_executable(${self} dummy.cc) +target_link_libraries(${self} PUBLIC ${self}_o floormat-loader floormat-serialize floormat) + if(FLOORMAT_PRECOMPILED-HEADERS) target_precompile_headers(${self} PRIVATE precomp.hpp) endif() diff --git a/test/dummy.cc b/test/dummy.cc new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/dummy.cc |