mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:54:17 +08:00
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
|
diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
|
||
|
index 1522db2..5ed2ea9 100644
|
||
|
--- a/CMake/folly-deps.cmake
|
||
|
+++ b/CMake/folly-deps.cmake
|
||
|
@@ -17,9 +17,17 @@ find_package(Boost 1.51.0 MODULE
|
||
|
list(APPEND FOLLY_LINK_LIBRARIES ${Boost_LIBRARIES})
|
||
|
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
|
||
|
|
||
|
-find_package(DoubleConversion MODULE REQUIRED)
|
||
|
-list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY})
|
||
|
-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR})
|
||
|
+find_package(double-conversion CONFIG REQUIRED)
|
||
|
+if (double-conversion_FOUND)
|
||
|
+ message(STATUS "Found double-conversion from package config")
|
||
|
+ set(FOLLY_HAVE_DOUBLE_CONVERSION ON)
|
||
|
+ # How to obtain link libraries from target? double-conversion doesn't set property INTERFACE_LINK_LIBRARIES
|
||
|
+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR})
|
||
|
+else()
|
||
|
+ find_package(DoubleConversion MODULE)
|
||
|
+ list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY})
|
||
|
+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR})
|
||
|
+endif()
|
||
|
|
||
|
set(FOLLY_HAVE_LIBGFLAGS OFF)
|
||
|
find_package(gflags CONFIG REQUIRED)
|