pineapple/externals/vcpkg/ports/braft/fix-dependency.patch

17 lines
607 B
Diff
Raw Normal View History

2022-07-23 03:01:36 +02:00
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 53ddaed..a851c00 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,8 +47,9 @@ if ((NOT LEVELDB_INCLUDE_PATH) OR (NOT LEVELDB_LIB))
message(FATAL_ERROR "Fail to find leveldb")
endif()
-find_path(GFLAGS_INCLUDE_PATH NAMES gflags/gflags.h)
-find_library(GFLAGS_LIB NAMES gflags)
+find_package(gflags CONFIG REQUIRED)
+get_target_property(GFLAGS_INCLUDE_PATH gflags::gflags INTERFACE_INCLUDE_DIRECTORIES)
+set(GFLAGS_LIB gflags::gflags)
if ((NOT GFLAGS_INCLUDE_PATH) OR (NOT GFLAGS_LIB))
message(FATAL_ERROR "Fail to find gflags")
endif()