File use_system_fmt.patch of Package pioneer
From: Adam Mizerski <adam@mizerski.pl>
Date: 2024-03-30T17:32:15+01:00
Subject: use system fmt
Upstream: no
By default it's built from bundled source as shared library and installed conflicting with system one.
Index: pioneer-20250203/CMakeLists.txt
===================================================================
--- pioneer-20250203.orig/CMakeLists.txt
+++ pioneer-20250203/CMakeLists.txt
@@ -272,7 +272,7 @@ find_package(OpenGL REQUIRED)
set(FMT_INSTALL OFF CACHE BOOL "Enable install of libfmt" FORCE)
add_subdirectory(contrib/lz4)
-add_subdirectory(contrib/fmt)
+find_package(fmt REQUIRED)
set(NANOSOCKETS_STATIC "1")
add_subdirectory(contrib/nanosockets)
@@ -284,7 +284,6 @@ include_directories(
${PIONEER_SRC}
${PIONEER_CONTRIB}
${PIONEER_CONTRIB}/doctest
- ${PIONEER_CONTRIB}/fmt/include
${ASSIMP_INCLUDE_DIRS}
${FREETYPE_INCLUDE_DIRS}
${OPENGL_INCLUDE_DIRS}
@@ -377,7 +376,7 @@ else()
message(WARNING, "Python 2 not found; enums will not be scanned.")
endif()
-target_link_libraries(pioneer-lib PUBLIC lz4 fmt::fmt)
+target_link_libraries(pioneer-lib PUBLIC lz4 fmt)
list(APPEND pioneerLibs
pioneer-core