Skip to content

cmake: external add-ons get score's Win32 macros, and Qt Quick in developer mode - #2351

Merged
jcelerier merged 2 commits into
masterfrom
fix/addon-win32-defines
Oct 19, 2026
Merged

jcelerier merged 2 commits into
masterfrom
fix/addon-win32-defines

Conversation

@jcelerier

Copy link
Copy Markdown
Member

Two gaps in the cmake that external add-ons build with, found while porting score-addon-spatgris and score-addon-py to 3.9.

cmake: give external add-ons score's Win32 macros: score has compiled every C++ translation unit with NOMINMAX and WIN32_LEAN_AND_MEAN, and every one with _WIN32_WINNT=0x0A00, since 3544790. Those are directory-level definitions in ScoreConfiguration.cmake, so neither the SDK nor the developer add-on setup ever passed them on. An add-on therefore compiled score's headers against the full <windows.h>, and spatgris stopped with WinSock.h has already been included when Boost.Asio came in through ossia/network/sockets/udp_socket.hpp. Both SDK and developer builds failed.

cmake: give developer-mode add-ons Qt Quick through score_plugin_js: JS/Qml/QmlObjects.hpp includes <QQuickItem>, but the developer setup's score_plugin_js interface target did not carry Qt Quick. py's dev builds failed on every platform with 'QQuickItem' file not found.

Verification

Runs on GitHub-hosted runners:

  • spatgris, SDK Windows continuous (run): fails with the released ScoreExternalAddon.sdk.cmake and passes with this branch's. Dev Windows: fails against score master and passes against this branch.

  • Regression sweep, same run: every add-on and template PR branch was built on SDK Windows continuous with the patched cmake. 18 of 21 pass: ble, cv, deuterium, lavfi, librediffusion, lsl, ltc, ndi, puara, spatgris, synthimi, ultraleap, and all six templates. The other three are not caused by this change:

    • network: the known missing QtWebSockets exports.
    • led: its CI is Linux-only, and the Release install step fails on unknown target 'install'.
    • orbbec: the test checked out submodules that orbbec's own CI does not (submodules: false), so it compiled a vendored libusb that receives the MSVC-only /utf-8 flag.

    Dev Windows for ble and lsl passes both before and after.

  • py, dev builds against this branch: pass on Windows, Ubuntu and macOS. py#7's own CI, the same add-on commit against score master, fails on 'QQuickItem' file not found.

Not included

  • The JIT's populateDefinitions doesn't pass the Win32 macros either.
  • The SDK doesn't define BOOST_NO_RTTI=1, although score's own build and the developer setup do, and it changes Boost class layouts.

No add-on fails because of either yet, so I left them for a separate decision.

py's SDK builds also need ossia/libossia#964 (the SDK ships no ossia-qt/qml_context.hpp).

🤖 Generated with Claude Code

https://claude.ai/code/session_011sZwhLYYDxKd7Ei5rbEpZJ

jcelerier and others added 2 commits October 18, 2026 23:13
Since 3544790 score compiles every C++ translation unit with
NOMINMAX and WIN32_LEAN_AND_MEAN, and every translation unit with
_WIN32_WINNT=0x0A00, through directory-level definitions in
ScoreConfiguration.cmake. Those are not attached to any target, so
neither the SDK nor the developer add-on setup ever saw them, and an
add-on's headers were compiled against a different <windows.h> than
score's own.

score-addon-spatgris shows the consequence: one of score's headers it
includes pulls in the full <windows.h>, which includes <winsock.h>, and
the Boost.Asio that ossia/network/sockets/udp_socket.hpp brings in next
stops with "WinSock.h has already been included". It fails the same
way in the SDK and developer builds. With WIN32_LEAN_AND_MEAN,
<windows.h> leaves winsock out, as it does in score itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011sZwhLYYDxKd7Ei5rbEpZJ
JS/Qml/QmlObjects.hpp, the header add-ons include to use the JS
plug-in's port types, includes <QQuickItem>. In score's own build
score_plugin_js links Qt::Quick; the developer add-on setup finds Qt
Quick but its score_plugin_js interface target never carried it, so an
add-on linking score_plugin_js stopped at "'QQuickItem' file not found"
(score-addon-py's dev builds on every platform). The SDK build has the
whole Qt include tree on the path and is not affected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011sZwhLYYDxKd7Ei5rbEpZJ
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 48.869% (-0.3%) from 49.156% — fix/addon-win32-defines into master

@jcelerier
jcelerier merged commit 991b71f into master Oct 19, 2026
60 of 61 checks passed
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.

2 participants