-
Notifications
You must be signed in to change notification settings - Fork 15
Cmake: Cmake ffmpeg library fix for Windows #31
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
base: main
Are you sure you want to change the base?
Changes from all commits
b83a5c7
ea1c0a9
9ffc4e3
8a2174d
a5a16c1
af0d546
e1ad0af
44877ff
d86e382
e54b024
0d6e7f8
9d45afd
c34bf51
fa05997
63cb4ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| ## Windows Build Instructions | ||
|
|
||
| ### Build Setup | ||
|
|
||
| ```powershell | ||
| Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | ||
| choco install -y git | ||
| choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System' | ||
| choco install visualstudio2026buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended" | ||
| choco install rustup | ||
| ``` | ||
|
|
||
| During the rustup installation choose the `nightly` variant. | ||
|
|
||
| Locate "Visual Studio Installer". Click "Modify". Choose "Desktop Development with C++". Check C++ ATL For x64 | ||
|
|
||
| ### Build the OBS fork | ||
|
|
||
| ```powershell | ||
| cd obs-studio | ||
| cmake -G "Visual Studio 18 2026" -A x64 --preset windows-x64 | ||
| cmake --build --preset windows-x64 | ||
| ``` | ||
|
|
||
| ### Build the obs-moq plugin and install | ||
|
|
||
| ```powershell | ||
| cd obs | ||
| cmake -G "Visual Studio 18 2026" -A x64 --preset windows-x64 -DMOQ_LOCAL="../moq" | ||
| cmake --build --preset windows-x64 --target install | ||
| ``` | ||
|
|
||
|
|
||
|
|
||
| ## Debugging Moq Plugin | ||
|
|
||
| ```powershell | ||
| $env:RUST_LOG="debug"; $env:RUST_BACKTRACE=1; $env:OBS_LOG_LEVEL="debug"; Set-Location "build_x64\rundir\RelWithDebInfo\bin\64bit"; & .\obs64.exe --verbose | ||
| ``` |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -16,8 +16,8 @@ add_compile_options("$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:-fopenmp-simd>") | |||||||||
|
|
||||||||||
| # Ensure recent enough Xcode and platform SDK | ||||||||||
| function(check_sdk_requirements) | ||||||||||
| set(obs_macos_minimum_sdk 15.0) # Keep in sync with Xcode | ||||||||||
| set(obs_macos_minimum_xcode 16.0) # Keep in sync with SDK | ||||||||||
| set(obs_macos_minimum_sdk 26.1) # Keep in sync with Xcode | ||||||||||
| set(obs_macos_minimum_xcode 26.1) # Keep in sync with SDK | ||||||||||
|
Comment on lines
+19
to
+20
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Local thresholds in this PR:"
rg -n 'set\(obs_macos_minimum_(sdk|xcode)' cmake/macos/compilerconfig.cmake
echo
echo "Upstream OBS 32.1.2 thresholds:"
curl -fsSL https://raw.githubusercontent.com/obsproject/obs-studio/32.1.2/cmake/macos/compilerconfig.cmake \
| rg -n 'set\(obs_macos_minimum_(sdk|xcode)'Repository: moq-dev/obs Length of output: 369 26.1 macOS minimums are stricter than upstream OBS 32.1.2 baselines Lines 19–20 set both SDK and Xcode minimums to Align with upstream by using Suggested fix- set(obs_macos_minimum_sdk 26.1) # Keep in sync with Xcode
- set(obs_macos_minimum_xcode 26.1) # Keep in sync with SDK
+ set(obs_macos_minimum_sdk 15.0) # Keep in sync with Xcode
+ set(obs_macos_minimum_xcode 16.0) # Keep in sync with SDK📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| execute_process( | ||||||||||
| COMMAND xcrun --sdk macosx --show-sdk-platform-version | ||||||||||
| OUTPUT_VARIABLE obs_macos_current_sdk | ||||||||||
|
|
||||||||||
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.
Add
if(EXISTS ...)guard beforefile(READ ...)— fatal error if the path is absent.file(READ ...)on Line 67 will abort CMake configure with an unhelpful fatal error if${dependencies_dir}/${_obs_destination}/libobs-metal/CMakeLists.txtdoes not exist (e.g., partial extraction, unexpected OBS source layout, or obs-studio dependency not yet present). Add an existence check first.🛠️ Proposed fix
The proposed fix also escapes the
.characters in the version range regex (e.g.,3\\.28) so they match literal dots rather than any character, and adds a guard to warn if thestring(REGEX REPLACE)produces no change — which would leave Swift silently un-enabled even though theenable_language(Swift)check triggered.🤖 Prompt for AI Agents