-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sdl2] Add feature samplerate #28554
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake | ||
index 65a98efbe..2f99f28f1 100644 | ||
--- a/cmake/sdlchecks.cmake | ||
+++ b/cmake/sdlchecks.cmake | ||
@@ -352,7 +352,7 @@ endmacro() | ||
# - HAVE_SDL_LOADSO opt | ||
macro(CheckLibSampleRate) | ||
if(SDL_LIBSAMPLERATE) | ||
- find_package(SampleRate QUIET) | ||
+ find_package(SampleRate CONFIG REQUIRED) | ||
if(SampleRate_FOUND AND TARGET SampleRate::samplerate) | ||
set(HAVE_LIBSAMPLERATE TRUE) | ||
set(HAVE_LIBSAMPLERATE_H TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ vcpkg_from_github( | |
REF release-${VERSION} | ||
SHA512 c4cffa32d4d43de64cc47ada80a657a9db53f4c60da3684f96a036527fdc12b0e459e9e638cab6c7eb796de29fd60ee5a8c73b56bccd8483024e225c81469961 | ||
HEAD_REF main | ||
PATCHES | ||
deps.patch | ||
) | ||
|
||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC) | ||
|
@@ -16,6 +18,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | |
vulkan SDL_VULKAN | ||
x11 SDL_X11 | ||
wayland SDL_WAYLAND | ||
samplerate SDL_LIBSAMPLERATE | ||
) | ||
|
||
if ("x11" IN_LIST FEATURES) | ||
|
@@ -40,6 +43,8 @@ vcpkg_cmake_configure( | |
-DSDL_TEST=OFF | ||
-DSDL_IBUS=OFF | ||
-DSDL_INSTALL_CMAKEDIR="cmake" | ||
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
-DSDL_LIBSAMPLERATE_SHARED=OFF | ||
MAYBE_UNUSED_VARIABLES | ||
SDL_FORCE_STATIC_VCRT | ||
) | ||
|
@@ -54,6 +59,8 @@ file(REMOVE_RECURSE | |
"${CURRENT_PACKAGES_DIR}/debug/bin/sdl2-config" | ||
"${CURRENT_PACKAGES_DIR}/SDL2.framework" | ||
"${CURRENT_PACKAGES_DIR}/debug/SDL2.framework" | ||
"${CURRENT_PACKAGES_DIR}/share/licenses" | ||
"${CURRENT_PACKAGES_DIR}/share/aclocal" | ||
) | ||
|
||
file(GLOB BINS "${CURRENT_PACKAGES_DIR}/debug/bin/*" "${CURRENT_PACKAGES_DIR}/bin/*") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevent using CMake module first. Use vcpkg port instead.