From 1927618ced861b8d4c8ef6ab6873c539958e1d00 Mon Sep 17 00:00:00 2001 From: ToKiNoBug Date: Mon, 30 Oct 2023 19:33:46 +0800 Subject: [PATCH] Fix windows build with builtin fmt v10 Signed-off-by: ToKiNoBug --- src/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9e363504..79d2cab4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -96,7 +96,11 @@ if(KOMPUTE_OPT_INSTALL) # We can't export fmt::fmt because it's alias target, so we unwrap the alias and install it. get_target_property(fmt_aliased_target fmt::fmt ALIASED_TARGET) install(TARGETS ${fmt_aliased_target} - EXPORT komputeTargets) + EXPORT komputeTargets + #COMPONENT DO_NOT_INSTALL_THIS + EXCLUDE_FROM_ALL) + # Installation of headers changed in fmt from v8 to v10. In v10, cmake will try to find fmt headers in the + # include dir of kompute, which will fail definitely. Add EXCLUDE_FROM_ALL to avoid this bug. endif () if(KOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER)