2019-09-03 16:08:17 -07:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO mfontanini/cppkafka
|
2023-05-02 21:40:04 +02:00
|
|
|
REF "${VERSION}"
|
|
|
|
SHA512 86ac1500bdf6746a5e44e9ca4a4063eabcacec68b26c6846f7e7d47fe947309fc98a47986ab060d793096665d1cdc24044334267eb579cdb191f539bf96a3294
|
2019-09-03 16:08:17 -07:00
|
|
|
HEAD_REF master
|
2023-05-02 21:40:04 +02:00
|
|
|
PATCHES
|
|
|
|
0001-Fix-static-lib.patch
|
|
|
|
0002-Remove-min-max-macros.patch
|
2019-09-03 16:08:17 -07:00
|
|
|
)
|
|
|
|
|
2019-09-27 09:48:09 -07:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
set(CPPKAFKA_BUILD_SHARED OFF)
|
2023-05-02 21:40:04 +02:00
|
|
|
set(CPPKAFKA_RDKAFKA_STATIC_LIB ON)
|
2019-09-27 09:48:09 -07:00
|
|
|
else()
|
|
|
|
set(CPPKAFKA_BUILD_SHARED ON)
|
2023-05-02 21:40:04 +02:00
|
|
|
set(CPPKAFKA_RDKAFKA_STATIC_LIB OFF)
|
2019-09-27 09:48:09 -07:00
|
|
|
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-03 16:08:17 -07:00
|
|
|
OPTIONS
|
2023-05-02 21:40:04 +02:00
|
|
|
-DCMAKE_CXX_STANDARD=11
|
2019-09-27 09:48:09 -07:00
|
|
|
-DCPPKAFKA_BUILD_SHARED=${CPPKAFKA_BUILD_SHARED}
|
2019-09-03 16:08:17 -07:00
|
|
|
-DCPPKAFKA_DISABLE_TESTS=ON
|
|
|
|
-DCPPKAFKA_DISABLE_EXAMPLES=ON
|
2023-05-02 21:40:04 +02:00
|
|
|
-DCPPKAFKA_PKGCONFIG_DIR=lib/pkgconfig
|
|
|
|
-DCPPKAFKA_RDKAFKA_STATIC_LIB=${CPPKAFKA_RDKAFKA_STATIC_LIB}
|
2019-09-03 16:08:17 -07:00
|
|
|
)
|
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-09-03 16:08:17 -07:00
|
|
|
|
2019-09-27 09:48:09 -07:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2023-05-02 21:40:04 +02:00
|
|
|
vcpkg_cmake_config_fixup(
|
|
|
|
CONFIG_PATH lib/cmake/CppKafka
|
|
|
|
)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
)
|
2019-09-03 16:08:17 -07:00
|
|
|
|
|
|
|
# Handle copyright
|
2023-03-11 07:08:15 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
2023-05-02 21:40:04 +02:00
|
|
|
vcpkg_fixup_pkgconfig()
|