From bbd96808056fc400973cb5257e3a3976ad159d24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ivar=20H=C3=A4rnqvist?= <ivarhar@outlook.com>
Date: Fri, 15 May 2020 22:17:29 +0200
Subject: [PATCH] use regular fmt target if header-only does not exist

---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 485cd692..d9709f1e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,7 +86,8 @@ target_compile_options(
 target_link_libraries(
 	"${TARGET_NAME}"
 	PRIVATE
-		fmt::fmt-header-only
+		$<TARGET_NAME_IF_EXISTS:fmt::fmt-header-only>
+		$<$<NOT:$<TARGET_EXISTS:fmt::fmt-header-only>>:fmt::fmt>
 )
 
 # Copy binaries to project folder for debugging during development.
-- 
GitLab