diff --git a/.github/workflows/builds.yaml b/.github/workflows/builds.yaml index ef0dd3b..f0c98cb 100644 --- a/.github/workflows/builds.yaml +++ b/.github/workflows/builds.yaml @@ -11,7 +11,15 @@ concurrency: cancel-in-progress: true jobs: - ci: + # Build in/against ossia score: dev tree, SDK, and JIT artifact tracks. + score: + uses: ossia/actions/.github/workflows/score-addon.yml@master + secrets: inherit + with: + release: false # the templates ship no release.sh + + # Build the same object(s) standalone, one artifact per back-end. + standalone: uses: ossia/actions/.github/workflows/avnd-addon.yml@master secrets: inherit with: diff --git a/CMakeLists.txt b/CMakeLists.txt index 29046bd..ac84a33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,14 @@ cmake_minimum_required(VERSION 3.24 FATAL_ERROR) project(MyGeometry CXX) +# Max/MSP externals link the static CRT (/MT) on Windows, as the official +# max-sdk-base requires. Set it for the whole addon -- before Avendish and the +# object library are created -- so every target shares one runtime; mixing /MT +# and /MD trips MSVC with LNK2038. (CMP0091 is NEW via cmake_minimum_required.) +if(MSVC) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") +endif() + # Use the Avendish the host already provides (e.g. ossia score); otherwise fetch it. # The same CMakeLists builds this as an ossia/score add-on or as a standalone object. find_package(Avendish QUIET) @@ -16,7 +24,7 @@ if(NOT Avendish_FOUND) find_package(Avendish REQUIRED) endif() -avnd_addon_init(NAME MyGeometry) +avnd_addon_init(NAME MyGeometryAddon) # The geometry / mesh back-ends -- ossia, Max/MSP, TouchDesigner SOP and POP, and Godot # (a Node3D producing an ArrayMesh) -- plus `dump`, the plain-C++ introspection target @@ -25,7 +33,7 @@ avnd_addon_init(NAME MyGeometry) # is ignored and only the ossia process is produced. Back-ends whose SDK is absent are # silently skipped. avnd_addon_object( - BASE MyGeometry + BASE MyGeometryAddon C_NAME my_geometry CLASS MyGeometry BACKENDS dump ossia max:GEOMETRY touchdesigner:SOP touchdesigner:POP godot:GEOMETRY @@ -36,4 +44,4 @@ avnd_addon_object( src/UI.hpp src/Processor.hpp) -avnd_addon_finalize(NAME MyGeometry UUID 95b84273-50ed-4968-b32c-5c82bf3d184c VERSION 1.0.0) +avnd_addon_finalize(NAME MyGeometryAddon UUID 95b84273-50ed-4968-b32c-5c82bf3d184c VERSION 1) diff --git a/src/Model.hpp b/src/Model.hpp index 295dd75..0bba460 100644 --- a/src/Model.hpp +++ b/src/Model.hpp @@ -197,3 +197,8 @@ inline void MyGeometry::operator()() outputs.geometry.dirty_mesh = true; outputs.geometry.dirty_transform = true; } + +// Pull in the UI so MyGeometry::ui is complete wherever this class header is +// included -- the score plugin generator includes the class header, not the +// MAIN_FILE, and needs the full ui type to build the process's layer. +#include "UI.hpp"