mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-24 05:07:54 +08:00
c2f4953990
* wangle init * [wangle] Simplification * [wangle] Fix finding gflags
32 lines
851 B
Diff
32 lines
851 B
Diff
diff --git a/wangle/cmake/FindGflags.cmake b/wangle/cmake/FindGflags.cmake
|
|
index 0243aa3..be3780f 100644
|
|
--- a/wangle/cmake/FindGflags.cmake
|
|
+++ b/wangle/cmake/FindGflags.cmake
|
|
@@ -7,19 +7,11 @@
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
-find_library(GFLAGS_LIBRARY gflags
|
|
- PATHS ${GFLAGS_LIBRARYDIR})
|
|
+find_package(gflags CONFIG REQUIRED)
|
|
|
|
-find_path(GFLAGS_INCLUDE_DIR gflags/gflags.h
|
|
- PATHS ${GFLAGS_INCLUDEDIR})
|
|
-
|
|
-find_package_handle_standard_args(gflags DEFAULT_MSG
|
|
- GFLAGS_LIBRARY
|
|
- GFLAGS_INCLUDE_DIR)
|
|
-
|
|
-mark_as_advanced(
|
|
- GFLAGS_LIBRARY
|
|
- GFLAGS_INCLUDE_DIR)
|
|
-
|
|
-set(GFLAGS_LIBRARIES ${GFLAGS_LIBRARY})
|
|
-set(GFLAGS_INCLUDE_DIRS ${GFLAGS_INCLUDE_DIR})
|
|
+if(TARGET gflags_static)
|
|
+ set(GFLAGS_LIBRARIES gflags_static)
|
|
+else()
|
|
+ set(GFLAGS_LIBRARIES gflags_shared)
|
|
+endif()
|
|
+set(GFLAGS_INCLUDE_DIRS)
|