2021-10-01 04:03:56 +08:00
|
|
|
set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase")
|
|
|
|
include("${SCRIPT_PATH}/qt_install_submodule.cmake")
|
|
|
|
|
2022-11-19 04:31:51 +08:00
|
|
|
set(${PORT}_PATCHES
|
2024-06-21 11:19:25 +08:00
|
|
|
static_find_modules.patch
|
|
|
|
fix_avfoundation_target.patch
|
|
|
|
remove-static-ssl-stub.patch
|
2024-11-23 06:05:29 +08:00
|
|
|
ffmpeg-compile-def.patch
|
2022-07-30 12:28:59 +08:00
|
|
|
)
|
2021-10-01 04:03:56 +08:00
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2022-03-24 03:19:54 +08:00
|
|
|
"qml" CMAKE_REQUIRE_FIND_PACKAGE_Qt6Quick
|
|
|
|
"widgets" CMAKE_REQUIRE_FIND_PACKAGE_Qt6Widgets
|
2021-10-01 04:03:56 +08:00
|
|
|
INVERTED_FEATURES
|
|
|
|
"qml" CMAKE_DISABLE_FIND_PACKAGE_Qt6Quick
|
|
|
|
"widgets" CMAKE_DISABLE_FIND_PACKAGE_Qt6Widgets
|
|
|
|
"gstreamer" CMAKE_DISABLE_FIND_PACKAGE_GStreamer
|
2022-11-19 04:31:51 +08:00
|
|
|
"ffmpeg" CMAKE_DISABLE_FIND_PACKAGE_FFmpeg
|
|
|
|
# Features not yet added in the manifest:
|
|
|
|
"vaapi" CMAKE_DISABLE_FIND_PACKAGE_VAAPI # not in vpckg
|
2021-10-01 04:03:56 +08:00
|
|
|
)
|
|
|
|
|
2024-11-23 06:05:29 +08:00
|
|
|
set(unused "")
|
2021-10-01 04:03:56 +08:00
|
|
|
if("gstreamer" IN_LIST FEATURES)
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DINPUT_gstreamer='yes'")
|
|
|
|
else()
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DINPUT_gstreamer='no'")
|
2024-11-23 06:05:29 +08:00
|
|
|
list(APPEND unused INPUT_gstreamer_gl INPUT_gstreamer_photography)
|
2021-10-01 04:03:56 +08:00
|
|
|
endif()
|
2022-11-29 04:09:25 +08:00
|
|
|
list(APPEND FEATURE_OPTIONS "-DINPUT_gstreamer_gl='no'")
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DINPUT_gstreamer_photography='no'")
|
2021-10-01 04:03:56 +08:00
|
|
|
|
2022-11-19 04:31:51 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DFEATURE_wmf=ON")
|
|
|
|
else()
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DFEATURE_wmf=OFF")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if("ffmpeg" IN_LIST FEATURES)
|
|
|
|
# Note: Requires pulsadio on linux and wmfsdk on windows
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DINPUT_ffmpeg='yes'")
|
2024-01-03 06:42:40 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_ANDROID)
|
2022-11-19 04:31:51 +08:00
|
|
|
list(APPEND FEATURE_OPTIONS "-DINPUT_pulseaudio='no'")
|
|
|
|
else()
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DINPUT_pulseaudio='yes'")
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DINPUT_ffmpeg='no'")
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DINPUT_pulseaudio='no'")
|
|
|
|
endif()
|
|
|
|
|
2022-07-30 12:28:59 +08:00
|
|
|
# alsa is not ready
|
2024-05-01 02:50:26 +08:00
|
|
|
if(NOT "ffmpeg" IN_LIST FEATURES AND NOT "gstreamer" IN_LIST FEATURES AND VCPKG_TARGET_IS_LINUX)
|
|
|
|
#list(APPEND FEATURE_OPTIONS "-DFEATURE_alsa=ON") # alsa is experimental so don't activate it (also missing the dep on it.)
|
|
|
|
message(FATAL_ERROR "You need to activate at least one backend.")
|
|
|
|
else()
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DFEATURE_alsa=OFF")
|
|
|
|
endif()
|
2021-11-05 06:29:53 +08:00
|
|
|
|
2021-10-01 04:03:56 +08:00
|
|
|
qt_install_submodule(PATCHES ${${PORT}_PATCHES}
|
2024-06-21 11:19:25 +08:00
|
|
|
CONFIGURE_OPTIONS
|
|
|
|
--trace-expand
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON
|
2021-10-01 04:03:56 +08:00
|
|
|
CONFIGURE_OPTIONS_RELEASE
|
|
|
|
CONFIGURE_OPTIONS_DEBUG
|
2024-11-23 06:05:29 +08:00
|
|
|
CONFIGURE_OPTIONS_MAYBE_UNUSED ${unused}
|
2021-10-01 04:03:56 +08:00
|
|
|
)
|
2022-11-19 04:31:51 +08:00
|
|
|
|
|
|
|
if("gstreamer" IN_LIST FEATURES AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2024-06-20 05:07:05 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/Qt6Multimedia/Qt6QGstreamerMediaPluginDependencies.cmake" "GStreamer\;FALSE\;\;\;;GStreamer\;FALSE\;\;App\;;GStreamer\;FALSE\;\;\;Gl" "GStreamer\;FALSE\;\;\;;GStreamer\;FALSE\;\;App\;;GStreamer\;FALSE\;\;\;Gl;EGL\;FALSE\;\;\;" IGNORE_UNCHANGED)
|
2024-01-03 06:42:40 +08:00
|
|
|
endif()
|