vcpkg/ports/wangle/gflags.patch
atkawa7 c2f4953990 [new port] wangle init (#4133)
* wangle init

* [wangle] Simplification

* [wangle] Fix finding gflags
2018-08-24 13:43:41 -07:00

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)