2020-09-17 08:00:57 +08:00
|
|
|
vcpkg_fail_port_install(ON_TARGET "uwp")
|
|
|
|
|
2019-01-09 04:42:41 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2018-04-03 11:29:14 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2019-06-06 07:38:37 +08:00
|
|
|
REPO googleapis/google-cloud-cpp
|
2021-11-03 02:56:27 +08:00
|
|
|
REF v1.33.0
|
|
|
|
SHA512 fda083368db3b31dbfa6b6d6b02254a2c2b71a61389c94d8f62a5fcd729691bbe54745e1887fe36b244411af09fcaf7968e535ea9a3dc4833892859e7201bf67
|
2021-10-02 07:59:54 +08:00
|
|
|
HEAD_REF main
|
2018-04-03 11:29:14 +08:00
|
|
|
)
|
|
|
|
|
2021-03-27 03:55:34 +08:00
|
|
|
vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/grpc")
|
|
|
|
|
2021-08-31 08:14:50 +08:00
|
|
|
set(GOOGLE_CLOUD_CPP_ENABLE "${FEATURES}")
|
|
|
|
list(REMOVE_ITEM GOOGLE_CLOUD_CPP_ENABLE "core")
|
|
|
|
list(REMOVE_ITEM GOOGLE_CLOUD_CPP_ENABLE "googleapis")
|
|
|
|
|
2021-10-02 07:59:54 +08:00
|
|
|
vcpkg_cmake_configure(
|
2018-04-03 11:29:14 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2019-08-08 07:43:35 +08:00
|
|
|
DISABLE_PARALLEL_CONFIGURE
|
2018-04-03 11:29:14 +08:00
|
|
|
OPTIONS
|
2021-08-31 08:14:50 +08:00
|
|
|
"-DGOOGLE_CLOUD_CPP_ENABLE=${GOOGLE_CLOUD_CPP_ENABLE}"
|
2018-11-15 07:20:54 +08:00
|
|
|
-DGOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK=OFF
|
2020-06-03 13:46:06 +08:00
|
|
|
-DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF
|
2021-03-27 03:55:34 +08:00
|
|
|
-DGOOGLE_CLOUD_CPP_ENABLE_CCACHE=OFF
|
2021-06-05 07:50:36 +08:00
|
|
|
-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF
|
2019-11-20 07:57:48 +08:00
|
|
|
-DBUILD_TESTING=OFF
|
2018-04-03 11:29:14 +08:00
|
|
|
)
|
|
|
|
|
2021-10-02 07:59:54 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-04-03 11:29:14 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2021-10-06 07:03:03 +08:00
|
|
|
foreach(feature IN LISTS FEATURES)
|
|
|
|
set(config_path "lib/cmake/google_cloud_cpp_${feature}")
|
|
|
|
# Most features get their own package in `google-cloud-cpp`.
|
|
|
|
# The exceptions are captured by this `if()` command, basically
|
|
|
|
# things like `core` and `experimental-storage-grpc` are skipped.
|
|
|
|
if(NOT IS_DIRECTORY "${CURRENT_PACKAGES_DIR}/${config_path}")
|
|
|
|
continue()
|
|
|
|
endif()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME "google_cloud_cpp_${feature}"
|
|
|
|
CONFIG_PATH "${config_path}"
|
|
|
|
DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
|
|
endforeach()
|
|
|
|
# These packages are automatically installed depending on what features are
|
|
|
|
# enabled.
|
|
|
|
foreach(suffix common googleapis grpc_utils)
|
|
|
|
set(config_path "lib/cmake/google_cloud_cpp_${suffix}")
|
|
|
|
if(NOT IS_DIRECTORY "${CURRENT_PACKAGES_DIR}/${config_path}")
|
|
|
|
continue()
|
|
|
|
endif()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME "google_cloud_cpp_${suffix}"
|
|
|
|
CONFIG_PATH "${config_path}"
|
|
|
|
DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
|
|
endforeach()
|
2018-04-03 11:29:14 +08:00
|
|
|
|
2021-10-06 07:03:03 +08:00
|
|
|
# These packages are only for backwards compability. The google-cloud-cpp team
|
|
|
|
# is planning to remove them around 2022-02-15.
|
|
|
|
foreach(package
|
|
|
|
googleapis
|
|
|
|
bigtable_client
|
|
|
|
pubsub_client
|
|
|
|
spanner_client
|
|
|
|
storage_client)
|
2021-10-15 09:08:50 +08:00
|
|
|
set(config_path "lib/cmake/${package}")
|
|
|
|
if(NOT IS_DIRECTORY "${CURRENT_PACKAGES_DIR}/${config_path}")
|
2021-10-06 07:03:03 +08:00
|
|
|
continue()
|
|
|
|
endif()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME "${package}"
|
|
|
|
CONFIG_PATH "${config_path}"
|
|
|
|
DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/cmake"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share")
|
2020-02-09 12:23:12 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
2018-04-03 11:29:14 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|