2019-12-24 04:40:21 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO protobuf-c/protobuf-c
|
2021-11-17 01:44:24 +01:00
|
|
|
REF v1.4.0
|
|
|
|
SHA512 cba4c6116c0f2ebb034236e8455d493bfaa2517733befcd87b6f8d6d3df0c0149b17fcbf59cd1763fa2318119c664d0dae3d2d3a46ebfe2a0fec3ef4719b033b
|
2019-12-24 04:40:21 +08:00
|
|
|
HEAD_REF master
|
2020-05-27 13:08:00 +08:00
|
|
|
PATCHES
|
2021-11-17 01:44:24 +01:00
|
|
|
fix-crt-linkage.patch
|
2019-12-24 04:40:21 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-11-17 01:44:24 +01:00
|
|
|
FEATURES
|
|
|
|
tools BUILD_PROTOC
|
|
|
|
test BUILD_TESTS
|
2019-12-24 04:40:21 +08:00
|
|
|
)
|
|
|
|
|
2021-11-17 01:44:24 +01:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}/build-cmake"
|
2019-12-24 04:40:21 +08:00
|
|
|
DISABLE_PARALLEL_CONFIGURE
|
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
|
|
|
)
|
|
|
|
|
2021-11-17 01:44:24 +01:00
|
|
|
vcpkg_cmake_install(ADD_BIN_TO_PATH)
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
if("tools" IN_LIST FEATURES)
|
|
|
|
vcpkg_copy_tools(
|
|
|
|
TOOL_NAMES protoc-gen-c
|
|
|
|
AUTO_CLEAN
|
|
|
|
)
|
|
|
|
endif()
|
2019-12-24 04:40:21 +08:00
|
|
|
|
|
|
|
# Include files should not be duplicated into the /debug/include directory.
|
2021-11-17 01:44:24 +01:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
|
|
|
# Remove duplicate PDB files (vcpkg_copy_pdbs already copied them to "bin")
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/protobuf-c.pdb")
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/protobuf-c.pdb")
|
2019-12-24 04:40:21 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2021-11-17 01:44:24 +01:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|