2023-06-24 04:28:10 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO baresip/re
|
|
|
|
REF "v${VERSION}"
|
2024-03-26 06:29:52 +08:00
|
|
|
SHA512 f7aadce42e6d3477ab36cac44557d0c1c2df2f5a4c8f0d295d230345b1a73e2747360893d4d5de7dce3326eb0713680f59865eb86bdd3f224015c197fa41ccfe
|
2023-06-24 04:28:10 +08:00
|
|
|
HEAD_REF main
|
|
|
|
PATCHES
|
2023-10-24 02:18:23 +08:00
|
|
|
fix-static-library-build.patch
|
2023-06-24 04:28:10 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBRE_BUILD_SHARED)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LIBRE_BUILD_STATIC)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
-DLIBRE_BUILD_SHARED=${LIBRE_BUILD_SHARED}
|
|
|
|
-DLIBRE_BUILD_STATIC=${LIBRE_BUILD_STATIC}
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Backtrace=ON
|
|
|
|
-DCMAKE_REQUIRE_FIND_PACKAGE_OpenSSL=ON
|
|
|
|
-DCMAKE_REQUIRE_FIND_PACKAGE_ZLIB=ON
|
|
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2023-06-30 05:33:07 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME libre CONFIG_PATH lib/cmake/libre)
|
2023-06-24 04:28:10 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|