Repository navigation
cmake: external add-ons get score's Win32 macros, and Qt Quick in developer mode - #2351
Merged
Merged
Conversation
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
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 withNOMINMAXandWIN32_LEAN_AND_MEAN, and every one with_WIN32_WINNT=0x0A00, since 3544790. Those are directory-level definitions inScoreConfiguration.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 withWinSock.h has already been includedwhen Boost.Asio came in throughossia/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.hppincludes<QQuickItem>, but the developer setup'sscore_plugin_jsinterface 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.cmakeand 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:
unknown target 'install'.submodules: false), so it compiled a vendored libusb that receives the MSVC-only/utf-8flag.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
populateDefinitionsdoesn't pass the Win32 macros either.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