2019-09-04 07:08:17 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO mfontanini/cppkafka
|
2023-03-11 07:08:15 +08:00
|
|
|
REF "v${VERSION}"
|
2019-09-04 07:08:17 +08:00
|
|
|
SHA512 60d01ce1dd9bd9119676be939ed5ab03539abb1f945c1b31e432edfe0f06542778f7fef37696f5ff19c53024f44d5cbd8aeddbbb231c38b098e05285d3ff0cab
|
|
|
|
HEAD_REF master
|
2019-09-28 00:48:09 +08:00
|
|
|
PATCHES fix-dynamic.patch
|
2019-09-04 07:08:17 +08:00
|
|
|
)
|
|
|
|
|
2019-09-28 00:48:09 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
set(CPPKAFKA_BUILD_SHARED OFF)
|
|
|
|
else()
|
|
|
|
set(CPPKAFKA_BUILD_SHARED ON)
|
|
|
|
endif()
|
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-03-11 07:08:15 +08:00
|
|
|
DISABLE_PARALLEL_CONFIGURE
|
2019-09-04 07:08:17 +08:00
|
|
|
OPTIONS
|
2019-09-28 00:48:09 +08:00
|
|
|
-DCPPKAFKA_BUILD_SHARED=${CPPKAFKA_BUILD_SHARED}
|
2019-09-04 07:08:17 +08:00
|
|
|
-DCPPKAFKA_DISABLE_TESTS=ON
|
|
|
|
-DCPPKAFKA_DISABLE_EXAMPLES=ON
|
|
|
|
)
|
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-09-04 07:08:17 +08:00
|
|
|
|
2019-09-28 00:48:09 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-09-04 07:08:17 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2023-03-11 07:08:15 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|