Skip to content

Build system improvements: OTIO vcpkg overlay migration, general fixes, cross-platform docs#246

Open
OlafRocket wants to merge 2 commits intoAcademySoftwareFoundation:developfrom
OlafRocket:build-improvements
Open

Build system improvements: OTIO vcpkg overlay migration, general fixes, cross-platform docs#246
OlafRocket wants to merge 2 commits intoAcademySoftwareFoundation:developfrom
OlafRocket:build-improvements

Conversation

@OlafRocket
Copy link
Copy Markdown

Pull Request TITLE

[ Build system improvements: OTIO vcpkg overlay migration, general fixes, cross-platform docs ]

Summarize your change.

  • Migrated OpenTimelineIO from a git submodule to a vcpkg overlay port.
  • Added Ninja generator presets for macOS and Linux (Release, RelWithDebInfo, Debug).
  • Added aqtinstall as an alternative command-line method to install Qt.
  • Restructured the Windows build documentation around a unified Developer Shell setup, with separate sections for the Visual Studio and Ninja generators.
  • Several Windows build fixes: corrected QML DLL output directory, fixed Python install path mismatch, replaced install(CODE) with install(SCRIPT) in scripts/qt_install so packaging works.
  • Worked around Qt 6.5/6.8 FindWrapOpenGL.cmake AGL bug on macOS.
  • On Linux, cleaned up obsolete submodule/vcpkg-pin/preset-edit steps, replaced them with a flexible Qt6_DIR setup section, added an optional Ninja build path.

Describe the reason for the change.

Simplify the build system across all platforms by minimising manual setup steps. The goal is to handle all source code dependencies through vcpkg, while build tools (CMake, Ninja, compiler) are installed via each platform's native package manager or from open-source releases. Added an alternative way to install Qt from the command line that doesn't require a Qt account.

Describe what you have tested and on which operating system.

Built and ran on a clean system on:

  • Linux Rocky 9.7
  • Windows 10
  • macOS Sequoia 15.7

Add a list of changes, and note any that might need special attention during the review.

Core build system:

  • Migrate OpenTimelineIO from git submodule to vcpkg overlay port (cmake/vcpkg_overlay_ports/opentimelineio/). Removes extern/otio, .gitmodules, cmake/otio_patch.diff, and the OTIO_SUBMODULE option.
  • Add VCPKG_OVERLAY_PORTS path so the new OTIO overlay is picked up.
  • Pin python3 to 3.11 in vcpkg.json to align with VFX Reference Platform 2024.
  • Lowered CMake minimum from 3.28 to 3.26 (default on Rocky Linux 9).
  • Remove hardcoded Qt6_DIR from the default preset. Users now supply it via the Qt6_DIR environment variable, a CMakeUserPresets.json, or a one-off -D flag (documented in each build guide).
  • Add Ninja generator presets for macOS (arm / intel) and Linux — Release, RelWithDebInfo and Debug variants. Aligns with existing Windows Ninja presets.

Windows related changes:

  • OTIO portfile: on Windows, move .dll files from lib/ to bin/ (vcpkg convention for applocal.ps1 discovery) and rewrite generated Targets-*.cmake files so IMPORTED_LOCATION resolves correctly.
  • Fix scripts/qt_install to use install(SCRIPT) + configure_file instead of install(CODE), so ${CMAKE_INSTALL_PREFIX} resolves at install time. Previously the configure-time prefix was baked in, which broke the CPack package target because CPack uses a different (staging) prefix.
  • Remove the redundant early windeployqt call in src/launch/xstudio/src. The late call in scripts/qt_install now covers everything and runs after all other install rules have populated the install tree.
  • In cmake/macros.cmake (default_options_qt), add RUNTIME_OUTPUT_DIRECTORY alongside LIBRARY_OUTPUT_DIRECTORY so *_qml.dll files land in build/bin on Windows (Windows uses RUNTIME for .dll, not LIBRARY).
  • Fix Windows python install path mismatch in python/CMakeLists.txt: the build produces lib/python3.11/site-packages (Unix layout, because vcpkg's Python uses that layout on Windows), not Lib/site-packages.
  • Generate build/run_xstudio.bat — a dev launcher that puts Qt's bin directory on PATH and forwards arguments to xstudio.exe, so xstudio can be run straight from the build tree without a windeployqt pass.
  • Un-hide WinDebug preset.

macOS related changes

  • Replaces the previous manual-edit workaround Qt 6.5/6.8 bug in FindWrapOpenGL.cmake (which links -framework AGL, a library long removed from the macOS SDK) by pre-creating the WrapOpenGL::WrapOpenGL target so Qt's find-module returns early. Qt bug fixed upstream in Qt 6.9+; this workaround can be removed once the minimum supported Qt is 6.9.
  • Added a "Tell CMake where Qt is installed" section covering Qt6_DIR env var, CMakeUserPresets.json, and -D override.
  • Added an optional "Faster builds with Ninja" section with brew install ninja and the new presets.

Linux related changes

  • Adds VCPKG_OVERLAY_TRIPLETS to the linux-base preset so xstudio's overlay triplets (x64-xstudio-linux) are picked up automatically.
  • Lowered CMake minimum from 3.28 to 3.26 to match the default version shipped on Rocky Linux 9 — broadens distro compatibility without needing a manual CMake upgrade.
  • Added Ninja generator presets for Linux: LinuxNinjaRelease, LinuxNinjaRelWithDebInfo, LinuxNinjaDebug.

Documentation

  • downloading_qt.md: add aqtinstall instructions (command-line, no Qt account required) as a recommended alternative to the GUI installer. Covers Linux, macOS and Windows.
  • index.rst: add "Choosing a guide" section explaining the split between vcpkg-based guides (recommended) and distro-native guides (advanced).
  • linux_generic.md: restructured around the new Qt6_DIR / user-preset workflow, removed submodule instructions, added optional Ninja section.
  • macos.md: minor updates to reflect current dependency list and Qt workaround now handled in CMakeLists.txt.
  • windows.md: full rewrite, unified "Set up the build environment" section using Enter-VsDevShell with -SkipAutomaticLocation, separate build sections for Visual Studio and Ninja generators, corrected Qt path example (C:/Qt not C:/Qt6), add user-preset examples.

…-platform docs

Core build system
-----------------
- Migrate OpenTimelineIO from git submodule to vcpkg overlay port
  (cmake/vcpkg_overlay_ports/opentimelineio/). Removes extern/otio,
  .gitmodules, cmake/otio_patch.diff, and the OTIO_SUBMODULE option.
- OTIO portfile: on Windows, move .dll files from lib/ to bin/ (vcpkg
  convention for applocal.ps1 discovery) and rewrite generated
  Targets-*.cmake files so IMPORTED_LOCATION resolves correctly.
- Pin python3 to 3.11.11 in vcpkg.json.
- Lower CMake minimum from 3.28 to 3.26 for broader distro compatibility.
- Work around Qt 6.5/6.8 FindWrapOpenGL.cmake AGL bug on macOS by
  pre-creating WrapOpenGL::WrapOpenGL so Qt's find-module early-returns.
  Fixed upstream in Qt 6.9+; workaround can be removed once minimum
  supported Qt >= 6.9.

CMakePresets
------------
- Remove hardcoded Qt6_DIR from the default preset. Users now supply it
  via the Qt6_DIR environment variable, a CMakeUserPresets.json, or a
  one-off -D flag (documented in each build guide).
- Add VCPKG_OVERLAY_PORTS path so the new OTIO overlay is picked up.
- Add Ninja generator presets for macOS (arm / intel) and Linux — Release,
  RelWithDebInfo and Debug variants. Aligns with existing Windows Ninja
  presets.
- Un-hide WinDebug preset.
- Add VCPKG_OVERLAY_TRIPLETS to the Linux base preset.

Windows build fixes
-------------------
- Fix scripts/qt_install to use install(SCRIPT) + configure_file instead
  of install(CODE), so ${CMAKE_INSTALL_PREFIX} resolves at install time.
  Previously the configure-time prefix was baked in, which broke the
  CPack package target because CPack uses a different (staging) prefix.
- Remove the redundant early windeployqt call in src/launch/xstudio/src.
  The late call in scripts/qt_install now covers everything and runs
  after all other install rules have populated the install tree.
- In cmake/macros.cmake (default_options_qt), add RUNTIME_OUTPUT_DIRECTORY
  alongside LIBRARY_OUTPUT_DIRECTORY so *_qml.dll files land in build/bin
  on Windows (Windows uses RUNTIME for .dll, not LIBRARY).
- Fix Windows python install path mismatch in python/CMakeLists.txt:
  the build produces lib/python3.11/site-packages (Unix layout, because
  vcpkg's Python uses that layout on Windows), not Lib/site-packages.

Dev workflow
------------
- Generate build/run_xstudio.bat — a dev launcher that puts Qt's bin
  directory on PATH and forwards arguments to xstudio.exe, so xstudio
  can be run straight from the build tree without a windeployqt pass.

Documentation
-------------
- downloading_qt.md: add aqtinstall instructions (command-line, no Qt
  account required) as a recommended alternative to the GUI installer.
  Covers Linux, macOS and Windows.
- index.rst: add "Choosing a guide" section explaining the split between
  vcpkg-based guides (recommended) and distro-native guides (advanced).
- linux_generic.md: restructured around the new Qt6_DIR / user-preset
  workflow, removed submodule instructions, added optional Ninja section.
- macos.md: minor updates to reflect current dependency list and Qt
  workaround now handled in CMakeLists.txt.
- windows.md: full rewrite — unified "Set up the build environment"
  section using Enter-VsDevShell with -SkipAutomaticLocation, separate
  build sections for Visual Studio and Ninja generators, corrected Qt
  path example (C:/Qt not C:/Qt6), user-preset examples for both
  generators, note on run_xstudio.bat dev launcher.
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Apr 27, 2026

CLA Not Signed

- Require Ninja as the CMake generator on all platforms; remove the
  "Faster builds with Ninja (optional)" sections and the Visual Studio
  generator option on Windows.
- Pin vcpkg to commit c2aeddd80357b17592e59ad965d2adf65a19b22f in all
  three guides for reproducible dependency builds.
- Document CMakeUserPresets.json as the single way to point CMake at
  the local Qt 6.5.3 install; drop the Qt6_DIR env-var and one-off
  -DQt6_DIR command-line paths.
- Note that --target package on Windows is slow and recommend a plain
  cmake --build build for dev iteration.
- Remove docs/reference/build_guides/developer_tips.md and the link
  to it from windows.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant