2023-05-12 02:16:10 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
2019-05-03 13:57:43 +08:00
|
|
|
|
2024-01-25 05:31:39 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
ARCHIVE
|
2024-02-01 06:45:22 +08:00
|
|
|
URLS "https://codeberg.org/tenacityteam/libmad/releases/download/${VERSION}/libmad-${VERSION}.tar.gz"
|
2024-01-25 05:31:39 +08:00
|
|
|
FILENAME "tenacityteam-libmad-${VERSION}.tar.gz"
|
2024-02-01 06:45:22 +08:00
|
|
|
SHA512 5b0a826408395e8b6b8a33953401355d6c2f1b33ec5085530b4ac8a538c39ffa903ce2e6845e9dcad73936933078959960b2f3fbba11ae091fda5bc5ee310df5
|
2017-08-30 20:36:57 +08:00
|
|
|
)
|
|
|
|
|
2024-01-25 05:31:39 +08:00
|
|
|
vcpkg_extract_source_archive(SOURCE_PATH ARCHIVE "${ARCHIVE}")
|
2017-04-24 07:36:25 +08:00
|
|
|
|
2024-03-05 18:03:30 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
aso ASO
|
|
|
|
)
|
|
|
|
|
|
|
|
set(EXTRA_OPTIONS)
|
|
|
|
|
|
|
|
# Avoid architecture-specific assembly when targeting WASM. The upstream
|
|
|
|
# CMakeLists incorrectly recognizes the CPU as an Intel/64-bit CPU, therefore
|
|
|
|
# we have to override these flags:
|
|
|
|
# https://codeberg.org/tenacityteam/libmad/src/commit/84ba587793d61caadf6d1f6c0d94c3e165874a50/CMakeLists.txt
|
|
|
|
if(VCPKG_TARGET_IS_EMSCRIPTEN)
|
|
|
|
list(APPEND EXTRA_OPTIONS "-DFPM_64BIT=OFF -DFPM_INTEL=OFF -DFPM_DEFAULT=ON")
|
|
|
|
endif()
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-05-12 02:16:10 +08:00
|
|
|
OPTIONS
|
2024-03-05 18:03:30 +08:00
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
${EXTRA_OPTIONS}
|
2024-01-25 05:31:39 +08:00
|
|
|
-DEXAMPLE=OFF
|
2017-04-24 07:36:25 +08:00
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_install()
|
2024-01-25 05:31:39 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME "mad" CONFIG_PATH "lib/cmake/mad")
|
2023-05-12 02:16:10 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2017-04-24 07:36:25 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2024-01-25 05:31:39 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
2017-04-24 07:36:25 +08:00
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|