2018-08-25 04:43:41 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2018-10-12 13:03:05 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2018-08-25 04:43:41 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO facebook/wangle
|
2019-05-22 12:00:24 +08:00
|
|
|
REF v2019.05.13.00
|
|
|
|
SHA512 17cc164634d3bec5059abed8f28a8d5e76b6bf3475ee848c0fc0e88c59ce82d1257555a86c638484d81795b2e8f582a8559e13a195c38bdd88ae73e3a5684ffc
|
2018-08-25 04:43:41 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
|
|
|
build.patch
|
2019-03-14 01:08:42 +08:00
|
|
|
fix-config-cmake.patch
|
2018-08-25 04:43:41 +08:00
|
|
|
)
|
2019-05-03 13:57:43 +08:00
|
|
|
# message(FATAL_ERROR "patch")
|
2018-08-25 04:43:41 +08:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}/wangle"
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TESTS=OFF
|
2019-05-17 09:33:32 +08:00
|
|
|
-DBUILD_EXAMPLES=OFF
|
2018-10-12 13:03:05 +08:00
|
|
|
-DINCLUDE_INSTALL_DIR:STRING=include
|
2018-08-25 04:43:41 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/wangle")
|
2019-05-17 09:33:32 +08:00
|
|
|
|
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/share/wangle/wangle-targets.cmake _contents)
|
|
|
|
STRING(REPLACE "\${_IMPORT_PREFIX}/lib/" "\${_IMPORT_PREFIX}/\$<\$<CONFIG:DEBUG>:debug/>lib/" _contents "${_contents}")
|
|
|
|
STRING(REPLACE "\${_IMPORT_PREFIX}/debug/lib/" "\${_IMPORT_PREFIX}/\$<\$<CONFIG:DEBUG>:debug/>lib/" _contents "${_contents}")
|
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/wangle/wangle-targets.cmake "${_contents}")
|
|
|
|
|
2018-08-25 04:43:41 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE
|
2018-10-12 13:03:05 +08:00
|
|
|
${CURRENT_PACKAGES_DIR}/debug/include
|
2018-08-25 04:43:41 +08:00
|
|
|
${CURRENT_PACKAGES_DIR}/include/wangle/util/test
|
|
|
|
${CURRENT_PACKAGES_DIR}/include/wangle/ssl/test/certs
|
|
|
|
${CURRENT_PACKAGES_DIR}/include/wangle/service/test
|
|
|
|
${CURRENT_PACKAGES_DIR}/include/wangle/deprecated/rx/test
|
|
|
|
)
|
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wangle RENAME copyright)
|
2019-03-14 01:08:42 +08:00
|
|
|
file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/wangle)
|