File tree Expand file tree Collapse file tree 5 files changed +28
-16
lines changed
Expand file tree Collapse file tree 5 files changed +28
-16
lines changed Original file line number Diff line number Diff line change @@ -183,17 +183,17 @@ if(KOMPUTE_OPT_USE_SPDLOG)
183183 else ()
184184 find_package (spdlog REQUIRED)
185185 endif ()
186- endif ()
187-
188- # fmt
189- if (KOMPUTE_OPT_USE_BUILT_IN_FMT)
190- set (FMT_INSTALL ${KOMPUTE_OPT_INSTALL} )
191- FetchContent_Declare(fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git
192- GIT_TAG 11.0.0
193- GIT_SHALLOW 1) # Source: https://github.com/fmtlib/fmt/releases
194- FetchContent_MakeAvailable(fmt)
195186else ()
196- find_package (fmt REQUIRED)
187+ # fmt
188+ if (KOMPUTE_OPT_USE_BUILT_IN_FMT)
189+ set (FMT_INSTALL ${KOMPUTE_OPT_INSTALL} )
190+ FetchContent_Declare(fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git
191+ GIT_TAG 11.0.0
192+ GIT_SHALLOW 1) # Source: https://github.com/fmtlib/fmt/releases
193+ FetchContent_MakeAvailable(fmt)
194+ else ()
195+ find_package (fmt REQUIRED)
196+ endif ()
197197endif ()
198198
199199# GoogleTest
Original file line number Diff line number Diff line change @@ -67,13 +67,11 @@ if(KOMPUTE_OPT_ANDROID_BUILD)
6767 target_link_libraries (kompute PUBLIC vulkanAndroid
6868 android
6969 kp_logger
70- kp_shader
71- fmt::fmt)
70+ kp_shader)
7271else ()
7372 target_link_libraries (kompute PUBLIC Vulkan::Vulkan
7473 kp_logger
75- kp_shader
76- fmt::fmt)
74+ kp_shader)
7775endif ()
7876
7977if (KOMPUTE_OPT_BUILD_PYTHON)
@@ -94,7 +92,7 @@ add_subdirectory(shaders)
9492add_subdirectory (include )
9593
9694if (KOMPUTE_OPT_INSTALL)
97- if (KOMPUTE_OPT_USE_BUILT_IN_FMT)
95+ if (NOT KOMPUTE_OPT_USE_SPDLOG AND KOMPUTE_OPT_USE_BUILT_IN_FMT)
9896 # We can't export fmt::fmt because it's alias target, so we unwrap the alias and install it.
9997 get_target_property (fmt_aliased_target fmt::fmt ALIASED_TARGET)
10098 install (TARGETS ${fmt_aliased_target}
Original file line number Diff line number Diff line change 22
33#include " kompute/Manager.hpp"
44#include " kompute/logger/Logger.hpp"
5+ #if KOMPUTE_OPT_USE_SPDLOG
6+ #include < spdlog/fmt/fmt.h>
7+ #include < spdlog/fmt/ranges.h>
8+ #else
59#include < fmt/core.h>
610#include < fmt/ranges.h>
11+ #endif
712#include < iterator>
813#include < set>
914#include < sstream>
Original file line number Diff line number Diff line change 33#include " kompute/Memory.hpp"
44#include " kompute/Image.hpp"
55#include " kompute/Tensor.hpp"
6+ #if KOMPUTE_OPT_USE_SPDLOG
7+ #include < spdlog/fmt/fmt.h>
8+ #else
69#include < fmt/core.h>
10+ #endif
711
812namespace kp {
913
Original file line number Diff line number Diff line change 33
44#include " kompute/Core.hpp"
55
6- #include " fmt/format.h"
6+ #if KOMPUTE_OPT_USE_SPDLOG
7+ #include < spdlog/fmt/fmt.h>
8+ #else
9+ #include < fmt/format.h>
10+ #endif
11+
712#include " kompute/Tensor.hpp"
813#include " logger/Logger.hpp"
914
You can’t perform that action at this time.
0 commit comments