mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-26 05:19:06 +08:00
62cbf26175
* [rsocket] Add new port * [rsocket] don't build in some window environment * [rsocket] add missing deps in CONTROL * [rsocket] add missing deps in CONTROL * [rsocket] remove some deprecated args * [rsocket] romove vcpkg_fail_port_install(ON_ARCH x64) * [rsocket] only support x64 architecture * [rsocket] upgrade to 2020.05.04.00 * [rsocket] add vcpkg_fail_port_install to portfile * [rsocket] Fix find dependencies * Update ports/rsocket/portfile.cmake * Update ports/rsocket/CONTROL Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
95 lines
2.6 KiB
Diff
95 lines
2.6 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index f69e907..22570b5 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -124,7 +124,7 @@ option(BUILD_BENCHMARKS "Build benchmarks" ON)
|
|
option(BUILD_EXAMPLES "Build examples" ON)
|
|
option(BUILD_TESTS "Build tests" ON)
|
|
|
|
-enable_testing()
|
|
+#enable_testing()
|
|
|
|
include(ExternalProject)
|
|
include(CTest)
|
|
@@ -172,7 +172,9 @@ endif()
|
|
|
|
if("${BUILD_TYPE_LOWER}" MATCHES "debug")
|
|
message("debug mode was set")
|
|
+ if (NOT WIN32)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unreachable-code")
|
|
+ endif()
|
|
else()
|
|
message("release mode was set")
|
|
endif()
|
|
@@ -181,18 +183,25 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
|
set(TEST_CXX_FLAGS ${TEST_CXX_FLAGS} -Wno-inconsistent-missing-override)
|
|
endif()
|
|
|
|
-find_library(DOUBLE-CONVERSION double-conversion)
|
|
+find_package(double-conversion CONFIG REQUIRED)
|
|
|
|
find_package(OpenSSL REQUIRED)
|
|
|
|
-find_package(Gflags REQUIRED)
|
|
+find_package(gflags CONFIG REQUIRED)
|
|
|
|
-# find glog::glog to satisfy the folly dep.
|
|
-find_package(Glog REQUIRED)
|
|
+find_package(ZLIB REQUIRED)
|
|
|
|
-find_package(fmt CONFIG REQUIRED)
|
|
+if (BUILD_SHARED_LIBS)
|
|
+ set(gflags gflags_shared)
|
|
+else()
|
|
+ set(gflags gflags_static)
|
|
+endif()
|
|
|
|
-include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR})
|
|
+# find glog::glog to satisfy the folly dep.
|
|
+find_package(folly CONFIG REQUIRED)
|
|
+#find_package(glog CONFIG REQUIRED)
|
|
+#
|
|
+#find_package(fmt CONFIG REQUIRED)
|
|
|
|
include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR})
|
|
|
|
@@ -327,7 +336,7 @@ target_compile_options(
|
|
ReactiveSocket
|
|
PRIVATE ${EXTRA_CXX_FLAGS})
|
|
|
|
-enable_testing()
|
|
+#enable_testing()
|
|
|
|
install(TARGETS ReactiveSocket EXPORT rsocket-exports DESTINATION lib)
|
|
install(DIRECTORY rsocket DESTINATION include FILES_MATCHING PATTERN "*.h")
|
|
@@ -470,7 +479,7 @@ if(BUILD_TESTS)
|
|
${GMOCK_LIBS} # This also needs the preceding `add_dependencies`
|
|
glog::glog
|
|
gflags
|
|
- ${DOUBLE-CONVERSION})
|
|
+ double-conversion::double-conversion)
|
|
|
|
# Download the latest TCK drivers JAR.
|
|
set(TCK_DRIVERS_JAR rsocket-tck-drivers-0.9.10.jar)
|
|
diff --git a/yarpl/CMakeLists.txt b/yarpl/CMakeLists.txt
|
|
index f4159b8..8c01ffb 100644
|
|
--- a/yarpl/CMakeLists.txt
|
|
+++ b/yarpl/CMakeLists.txt
|
|
@@ -53,8 +53,14 @@ endif()
|
|
# Using NDEBUG in Release builds.
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")
|
|
|
|
-find_package(Gflags REQUIRED)
|
|
-find_package(Glog REQUIRED)
|
|
+find_package(gflags CONFIG REQUIRED)
|
|
+if (BUILD_SHARED_LIBS)
|
|
+ set(gflags gflags_shared)
|
|
+else()
|
|
+ set(gflags gflags_static)
|
|
+endif()
|
|
+
|
|
+find_package(glog CONFIG REQUIRED)
|
|
find_package(fmt CONFIG REQUIRED)
|
|
|
|
IF(NOT FOLLY_VERSION)
|