2020-08-02 04:55:50 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO apache/avro
|
2023-09-29 13:59:41 +08:00
|
|
|
REF "release-${VERSION}"
|
2024-09-04 02:09:33 +08:00
|
|
|
SHA512 8cc6ef3cf1e0a919118c8ba5817a1866dc4f891fa95873c0fe1b4b388858fbadee8ed50406fa0006882cab40807fcf00c5a2dcd500290f3868d9d06b287eacb6
|
2020-08-02 04:55:50 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2023-08-03 00:33:01 +08:00
|
|
|
fix-cmake.patch
|
2024-09-04 02:09:33 +08:00
|
|
|
fix-fmt.patch
|
2020-08-02 04:55:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
INVERTED_FEATURES
|
2022-11-22 00:51:38 +08:00
|
|
|
snappy CMAKE_DISABLE_FIND_PACKAGE_Snappy
|
2020-08-02 04:55:50 +08:00
|
|
|
)
|
|
|
|
|
2022-11-22 00:51:38 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}/lang/c++"
|
2020-08-02 04:55:50 +08:00
|
|
|
OPTIONS
|
2023-08-03 00:33:01 +08:00
|
|
|
-DBUILD_TESTING=OFF
|
2020-08-02 04:55:50 +08:00
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
)
|
|
|
|
|
2023-08-03 00:33:01 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT})
|
|
|
|
|
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/share/unofficial-avro-cpp/unofficial-avro-cpp-config.cmake" cmake_config)
|
|
|
|
if("snappy" IN_LIST FEATURES)
|
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/share/unofficial-avro-cpp/unofficial-avro-cpp-config.cmake"
|
|
|
|
"include(CMakeFindDependencyMacro)
|
2024-09-04 02:09:33 +08:00
|
|
|
find_dependency(Boost REQUIRED COMPONENTS filesystem iostreams program_options regex system)
|
|
|
|
find_dependency(fmt CONFIG)
|
2023-08-03 00:33:01 +08:00
|
|
|
find_dependency(Snappy)
|
|
|
|
${cmake_config}
|
|
|
|
")
|
|
|
|
else()
|
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/share/unofficial-avro-cpp/unofficial-avro-cpp-config.cmake"
|
|
|
|
"include(CMakeFindDependencyMacro)
|
2024-09-04 02:09:33 +08:00
|
|
|
find_dependency(Boost REQUIRED COMPONENTS filesystem iostreams program_options regex system)
|
|
|
|
find_dependency(fmt CONFIG)
|
2023-08-03 00:33:01 +08:00
|
|
|
${cmake_config}
|
|
|
|
")
|
|
|
|
endif()
|
2020-08-02 04:55:50 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
2023-08-03 00:33:01 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES avrogencpp AUTO_CLEAN)
|
2020-08-02 04:55:50 +08:00
|
|
|
|
2022-11-22 00:51:38 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2023-08-03 00:33:01 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2020-08-02 04:55:50 +08:00
|
|
|
|
2023-08-03 00:33:01 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/lang/c++/LICENSE")
|
2022-11-22 00:51:38 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|