summaryrefslogtreecommitdiffhomepage
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-12-05 07:48:36 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-12-05 07:48:51 +0100
commitbd34d6ef65fed8d28be57a41f70bf2abada00c76 (patch)
tree63d4899e781f3e5e1e10966aaf6f430e4d3b55b0 /test/CMakeLists.txt
parent900d775c8f4f078dc7cba8557e3991e52d2d5f89 (diff)
cmake: remove transitive deps to speed up build
Also build them out of order to make sure there are no dependencies remaining.
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt18
1 files changed, 9 insertions, 9 deletions
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)