17 lines
607 B
Diff
Executable File
17 lines
607 B
Diff
Executable File
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()
|