diff --git a/CMakeLists.txt b/CMakeLists.txt index 75494ab26a..d7bd92c2d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,9 +93,16 @@ find_package(Zstd REQUIRED) find_package(ZLIB REQUIRED) find_package(OpenSSL REQUIRED) find_package(Threads) -find_package(Cares REQUIRED) find_package(Glog REQUIRED) +set(CARES_PACKAGE_NAME Cares) +set(CARES_LIBRARY_NAME cares) +if (APPLE) + set(CARES_PACKAGE_NAME c-ares) + set(CARES_LIBRARY_NAME c-ares::cares) +endif (APPLE) +find_package(${CARES_PACKAGE_NAME} REQUIRED) + # Propagate glog's required compile definition to all proxygen targets. # glog 0.7+ requires GLOG_USE_GLOG_EXPORT but since glog::glog is linked # PRIVATE on the monolithic library, OBJECT libraries don't inherit it. diff --git a/build/fbcode_builder/manifests/googletest b/build/fbcode_builder/manifests/googletest index 70739da7fb..b4653e191a 100644 --- a/build/fbcode_builder/manifests/googletest +++ b/build/fbcode_builder/manifests/googletest @@ -7,7 +7,7 @@ sha256 = 65fab701d9829d38cb77c14acdc431d2108bfdbf8979e40eb8ae567edf10b27c [build] builder = cmake -subdir = googletest-1.17.0 +subdir = googletest-v1.17.0 [cmake.defines] # Everything else defaults to the shared runtime, so tell gtest that diff --git a/proxygen/build.sh b/proxygen/build.sh index aa2d581f8e..4e27ced8cc 100755 --- a/proxygen/build.sh +++ b/proxygen/build.sh @@ -272,6 +272,7 @@ function setup_zstd() { mkdir -p "$ZSTD_BUILD_DIR" cd "$ZSTD_BUILD_DIR" || exit cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.10 \ -DBUILD_TESTS=OFF \ -DCMAKE_PREFIX_PATH="$ZSTD_INSTALL_DIR" \ -DCMAKE_INSTALL_PREFIX="$ZSTD_INSTALL_DIR" \ @@ -361,6 +362,7 @@ function setup_fizz() { -DCMAKE_PREFIX_PATH="$DEPS_DIR" \ -DCMAKE_INSTALL_PREFIX="$DEPS_DIR" \ -DBUILD_TESTS=OFF \ + -DBUILD_EXAMPLES=OFF \ "$MAYBE_USE_STATIC_DEPS" \ "$MAYBE_BUILD_SHARED_LIBS" \ "$MAYBE_OVERRIDE_CXX_FLAGS" \ diff --git a/proxygen/lib/dns/CMakeLists.txt b/proxygen/lib/dns/CMakeLists.txt index 527b5a4fc2..f2aa2f6649 100644 --- a/proxygen/lib/dns/CMakeLists.txt +++ b/proxygen/lib/dns/CMakeLists.txt @@ -61,7 +61,7 @@ proxygen_add_library(proxygen_dns_cares_dns proxygen_utils_time_util Folly::folly_conv Folly::folly_portability_sockets - cares + ${CARES_LIBRARY_NAME} glog::glog EXPORTED_DEPS proxygen_dns_dns_base @@ -69,7 +69,7 @@ proxygen_add_library(proxygen_dns_cares_dns Folly::folly_io_async_async_base Folly::folly_network_address Folly::folly_portability_windows - cares + ${CARES_LIBRARY_NAME} ) proxygen_add_library(proxygen_dns_future_dns