2020-12-01 03:57:13 +08:00
|
|
|
if(VCPKG_USE_HEAD_VERSION)
|
|
|
|
vcpkg_from_gitlab(
|
|
|
|
GITLAB_URL "https://gitlab.xiph.org"
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO xiph/speexdsp
|
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
# Since the github repo is out-dated, use official download URL for release builds to reduce traffic to the Gitlab host
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2022-07-13 01:50:03 +08:00
|
|
|
URLS "http://downloads.xiph.org/releases/speex/speexdsp-1.2.1.tar.gz"
|
|
|
|
FILENAME "speexdsp-1.2.1.tar.gz"
|
|
|
|
SHA512 41b5f37b48db5cb8c5a0f6437a4a8266d2627a5b7c1088de8549fe0bf0bb3105b7df8024fe207eef194096e0726ea73e2b53e0a4293d8db8e133baa0f8a3bad3
|
2020-12-01 03:57:13 +08:00
|
|
|
)
|
2023-04-14 00:13:15 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
2020-12-01 03:57:13 +08:00
|
|
|
ARCHIVE "${ARCHIVE}"
|
2023-04-14 00:13:15 +08:00
|
|
|
SOURCE_BASE "1.2.1"
|
2022-03-03 05:59:46 +08:00
|
|
|
PATCHES
|
|
|
|
jitter_ctl.patch
|
2020-12-01 03:57:13 +08:00
|
|
|
)
|
|
|
|
endif()
|
2019-10-08 01:35:13 +08:00
|
|
|
|
2022-06-23 05:16:14 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
2017-08-26 20:22:53 +08:00
|
|
|
|
2018-03-06 04:19:27 +08:00
|
|
|
set(USE_SSE OFF)
|
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
|
|
set(USE_SSE ON)
|
|
|
|
endif()
|
2020-12-01 03:57:13 +08:00
|
|
|
set(USE_NEON OFF)
|
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
|
|
|
set(USE_NEON ON)
|
|
|
|
endif()
|
2018-03-06 04:19:27 +08:00
|
|
|
|
2022-06-23 05:16:14 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-10-08 01:35:13 +08:00
|
|
|
OPTIONS
|
|
|
|
-DUSE_SSE=${USE_SSE}
|
2020-12-01 03:57:13 +08:00
|
|
|
-DUSE_NEON=${USE_NEON}
|
2017-08-26 20:22:53 +08:00
|
|
|
)
|
|
|
|
|
2022-06-23 05:16:14 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-10-08 01:35:13 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2017-08-26 20:22:53 +08:00
|
|
|
|
2021-01-13 12:11:21 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2022-06-23 05:16:14 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2017-08-26 20:22:53 +08:00
|
|
|
|
2019-10-08 01:35:13 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright")
|