2017-07-25 21:05:23 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO kcat/openal-soft
|
2023-02-17 02:36:06 +08:00
|
|
|
REF ${VERSION}
|
2024-11-29 03:46:33 +08:00
|
|
|
SHA512 a60e1969bb5678219d8a7ae036d7081d61faa176689ac444802a45f4081aff07a6315575c02784bfce2ec6149c160270082ae076be668f32d79a6fac06513be0
|
2017-07-25 21:05:23 +08:00
|
|
|
HEAD_REF master
|
2018-04-04 08:02:40 +08:00
|
|
|
)
|
2017-07-25 21:05:23 +08:00
|
|
|
|
2022-08-12 09:27:22 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
pipewire ALSOFT_BACKEND_PIPEWIRE
|
|
|
|
)
|
|
|
|
|
2017-07-25 21:05:23 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
|
|
set(OPENAL_LIBTYPE "SHARED")
|
|
|
|
else()
|
|
|
|
set(OPENAL_LIBTYPE "STATIC")
|
|
|
|
endif()
|
2016-09-19 11:50:08 +08:00
|
|
|
|
2020-03-05 05:03:38 +08:00
|
|
|
set(ALSOFT_REQUIRE_LINUX OFF)
|
|
|
|
set(ALSOFT_REQUIRE_WINDOWS OFF)
|
2021-08-12 10:42:28 +08:00
|
|
|
set(ALSOFT_REQUIRE_APPLE OFF)
|
2022-08-23 00:44:24 +08:00
|
|
|
set(ALSOFT_CPUEXT_NEON OFF)
|
2020-03-05 05:03:38 +08:00
|
|
|
|
2020-01-11 02:31:14 +08:00
|
|
|
if(VCPKG_TARGET_IS_LINUX)
|
2018-04-27 18:15:17 +08:00
|
|
|
set(ALSOFT_REQUIRE_LINUX ON)
|
2020-01-11 02:31:14 +08:00
|
|
|
endif()
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2018-04-27 18:15:17 +08:00
|
|
|
set(ALSOFT_REQUIRE_WINDOWS ON)
|
2020-03-05 05:03:38 +08:00
|
|
|
endif()
|
2021-08-12 10:42:28 +08:00
|
|
|
if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS)
|
|
|
|
set(ALSOFT_REQUIRE_APPLE ON)
|
2018-04-27 18:15:17 +08:00
|
|
|
endif()
|
2022-08-23 00:44:24 +08:00
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
|
|
|
set(ALSOFT_CPUEXT_NEON ON)
|
|
|
|
endif()
|
2018-04-27 18:15:17 +08:00
|
|
|
|
2022-06-29 03:46:16 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-08-05 18:02:40 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2022-08-12 09:27:22 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
2017-07-25 21:05:23 +08:00
|
|
|
-DLIBTYPE=${OPENAL_LIBTYPE}
|
2016-09-19 11:50:08 +08:00
|
|
|
-DALSOFT_UTILS=OFF
|
|
|
|
-DALSOFT_NO_CONFIG_UTIL=ON
|
|
|
|
-DALSOFT_EXAMPLES=OFF
|
2024-11-27 04:25:47 +08:00
|
|
|
-DALSOFT_INSTALL_CONFIG=OFF
|
|
|
|
-DALSOFT_INSTALL_HRTF_DATA=OFF
|
|
|
|
-DALSOFT_INSTALL_AMBDEC_PRESETS=OFF
|
2018-04-27 18:15:17 +08:00
|
|
|
-DALSOFT_BACKEND_ALSA=${ALSOFT_REQUIRE_LINUX}
|
2017-07-25 21:05:23 +08:00
|
|
|
-DALSOFT_BACKEND_OSS=OFF
|
|
|
|
-DALSOFT_BACKEND_SOLARIS=OFF
|
|
|
|
-DALSOFT_BACKEND_SNDIO=OFF
|
|
|
|
-DALSOFT_BACKEND_PORTAUDIO=OFF
|
2022-08-12 09:27:22 +08:00
|
|
|
-DALSOFT_BACKEND_PULSEAUDIO=${ALSOFT_REQUIRE_LINUX}
|
2021-08-12 10:42:28 +08:00
|
|
|
-DALSOFT_BACKEND_COREAUDIO=${ALSOFT_REQUIRE_APPLE}
|
2017-07-25 21:05:23 +08:00
|
|
|
-DALSOFT_BACKEND_JACK=OFF
|
2022-05-05 10:24:07 +08:00
|
|
|
-DALSOFT_BACKEND_OPENSL=${VCPKG_TARGET_IS_ANDROID}
|
2017-07-25 21:05:23 +08:00
|
|
|
-DALSOFT_BACKEND_WAVE=ON
|
2021-01-17 11:57:12 +08:00
|
|
|
-DALSOFT_BACKEND_WINMM=OFF
|
2024-09-21 05:23:12 +08:00
|
|
|
-DALSOFT_BACKEND_DSOUND=${ALSOFT_REQUIRE_WINDOWS}
|
2021-01-17 11:57:12 +08:00
|
|
|
-DALSOFT_REQUIRE_WASAPI=${ALSOFT_REQUIRE_WINDOWS}
|
2022-08-23 00:44:24 +08:00
|
|
|
-DALSOFT_CPUEXT_NEON=${ALSOFT_CPUEXT_NEON}
|
2020-07-14 02:00:26 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_WindowsSDK=ON
|
2024-08-06 11:30:54 +08:00
|
|
|
-DCMAKE_POLICY_DEFAULT_CMP0057=NEW
|
2021-08-05 18:02:40 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
2024-11-27 04:25:47 +08:00
|
|
|
ALSOFT_INSTALL_AMBDEC_PRESETS
|
2021-08-05 18:02:40 +08:00
|
|
|
ALSOFT_BACKEND_ALSA
|
|
|
|
ALSOFT_BACKEND_COREAUDIO
|
|
|
|
ALSOFT_BACKEND_JACK
|
|
|
|
ALSOFT_BACKEND_OPENSL
|
|
|
|
ALSOFT_BACKEND_OSS
|
|
|
|
ALSOFT_BACKEND_PORTAUDIO
|
2022-08-12 09:27:22 +08:00
|
|
|
ALSOFT_BACKEND_PIPEWIRE
|
2021-08-05 18:02:40 +08:00
|
|
|
ALSOFT_BACKEND_PULSEAUDIO
|
|
|
|
ALSOFT_BACKEND_SNDIO
|
|
|
|
ALSOFT_BACKEND_SOLARIS
|
2024-11-27 04:25:47 +08:00
|
|
|
ALSOFT_INSTALL_CONFIG
|
2021-08-05 18:02:40 +08:00
|
|
|
ALSOFT_CPUEXT_NEON
|
2024-11-27 04:25:47 +08:00
|
|
|
ALSOFT_INSTALL_HRTF_DATA
|
2022-09-20 03:41:57 +08:00
|
|
|
ALSOFT_BACKEND_WINMM
|
|
|
|
ALSOFT_BACKEND_DSOUND
|
2021-08-05 18:02:40 +08:00
|
|
|
CMAKE_DISABLE_FIND_PACKAGE_WindowsSDK
|
2024-11-27 04:25:47 +08:00
|
|
|
CMAKE_POLICY_DEFAULT_CMP0057
|
2016-09-19 11:50:08 +08:00
|
|
|
)
|
|
|
|
|
2022-06-29 03:46:16 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/OpenAL")
|
2017-07-25 21:05:23 +08:00
|
|
|
|
|
|
|
foreach(HEADER al.h alc.h)
|
2021-08-05 18:02:40 +08:00
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/include/AL/${HEADER}" AL_H)
|
2017-07-25 21:05:23 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
string(REPLACE "defined(AL_LIBTYPE_STATIC)" "1" AL_H "${AL_H}")
|
|
|
|
else()
|
2021-09-28 04:59:30 +08:00
|
|
|
# Normally we would say:
|
|
|
|
# string(REPLACE "defined(AL_LIBTYPE_STATIC)" "0" AL_H "${AL_H}")
|
|
|
|
# but we are leaving these undefined macros alone in support of
|
|
|
|
# https://github.com/microsoft/vcpkg/issues/18098
|
2017-07-25 21:05:23 +08:00
|
|
|
endif()
|
2021-08-05 18:02:40 +08:00
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/include/AL/${HEADER}" "${AL_H}")
|
2017-07-25 21:05:23 +08:00
|
|
|
endforeach()
|
2016-09-19 11:50:08 +08:00
|
|
|
|
2021-08-05 18:02:40 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2021-02-09 09:58:32 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2023-02-17 02:36:06 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
2021-08-05 18:02:40 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2020-01-11 02:31:14 +08:00
|
|
|
|
2016-09-19 11:50:08 +08:00
|
|
|
vcpkg_copy_pdbs()
|