mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-10 11:59:01 +08:00
17 lines
607 B
Diff
17 lines
607 B
Diff
|
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()
|