zxing-cpp/cmake-check-system-first.patch

21 lines
718 B
Diff

diff -Nur zxing-cpp-1.2.0/test/blackbox/CMakeLists.txt new/test/blackbox/CMakeLists.txt
--- zxing-cpp-1.2.0/test/blackbox/CMakeLists.txt 2021-05-28 12:47:09.000000000 +0200
+++ new/test/blackbox/CMakeLists.txt 2021-05-29 13:34:47.707152999 +0200
@@ -1,10 +1,13 @@
cmake_minimum_required(VERSION 3.14)
-include(FetchContent)
-FetchContent_Declare (fmtlib
+find_package(fmt 7.1.2)
+if (NOT fmt_FOUND)
+ include(FetchContent)
+ FetchContent_Declare (fmtlib
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 7.1.2)
-FetchContent_MakeAvailable (fmtlib) # Adds fmt::fmt
+ FetchContent_MakeAvailable (fmtlib) # Adds fmt::fmt
+endif()
if (BUILD_READERS)
add_executable (ReaderTest