mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-11 11:16:40 +08:00
8fc4b4b950
* creating braft port * format manifest * version * Refix * version * Add dependency brpc * version * Add license * version * Fix dependency gflags, fix export include path * version * Re-fix dependency * version * Re-fix gflags * version * Add find_dependency * version Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
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()
|