diff --git a/cmake/avendish.dependencies.cmake b/cmake/avendish.dependencies.cmake index 61b4e8d3..56d4aaf9 100644 --- a/cmake/avendish.dependencies.cmake +++ b/cmake/avendish.dependencies.cmake @@ -41,3 +41,20 @@ if(NOT TARGET pantor::inja) ) FetchContent_MakeAvailable(pantor_inja) endif() + +if(APPLE) +if(NOT TARGET jthread) +FetchContent_Declare( + jthread + GIT_REPOSITORY "https://github.com/StirlingLabs/jthread" + GIT_TAG main + GIT_PROGRESS true +) +FetchContent_MakeAvailable(jthread) +endif() +endif() + + +if(NOT TARGET jthread) + add_library(jthread INTERFACE) +endif() diff --git a/cmake/avendish.ossia.cmake b/cmake/avendish.ossia.cmake index f88962b7..8a2c9663 100644 --- a/cmake/avendish.ossia.cmake +++ b/cmake/avendish.ossia.cmake @@ -67,9 +67,22 @@ function(avnd_make_ossia) PUBLIC Avendish::Avendish ossia::ossia - SDL2 ) + if(TARGET SDL2::SDL2) + target_link_libraries( + ${AVND_FX_TARGET} + PUBLIC + SDL2::SDL2 + ) + elseif(TARGET SDL2::SDL2-static) + target_link_libraries( + ${AVND_FX_TARGET} + PUBLIC + SDL2::SDL2-static + ) + endif() + avnd_common_setup("${AVND_TARGET}" "${AVND_FX_TARGET}") target_sources(Avendish PRIVATE diff --git a/cmake/avendish.standalone.cmake b/cmake/avendish.standalone.cmake index b15f5242..8ca6bb26 100644 --- a/cmake/avendish.standalone.cmake +++ b/cmake/avendish.standalone.cmake @@ -85,7 +85,20 @@ function(avnd_make_standalone) ${AVND_FX_TARGET} PUBLIC ossia::ossia - SDL2 + ) + endif() + + if(TARGET SDL2::SDL2) + target_link_libraries( + ${AVND_FX_TARGET} + PUBLIC + SDL2::SDL2 + ) + elseif(TARGET SDL2::SDL2-static) + target_link_libraries( + ${AVND_FX_TARGET} + PUBLIC + SDL2::SDL2-static ) endif() @@ -147,6 +160,7 @@ function(avnd_make_standalone) ${AVND_FX_TARGET} PUBLIC Avendish::Avendish + jthread ) if(TARGET ossia::ossia) diff --git a/cmake/avendish.vst3.cmake b/cmake/avendish.vst3.cmake index a78680b6..2bfd6f6f 100644 --- a/cmake/avendish.vst3.cmake +++ b/cmake/avendish.vst3.cmake @@ -71,7 +71,7 @@ function(avnd_make_vst3) ${AVND_FX_TARGET} PUBLIC Avendish::Avendish_vst3 - $ + $,base sdk_common pluginterfaces,$> DisableExceptions ) @@ -84,7 +84,7 @@ function(avnd_make_vst3) endif() if(APPLE) - target_link_libraries(${AVND_FX_TARGET} PRIVATE "-Wl, -exported_symbols_list ,${CMAKE_BINARY_DIR}/vst3_symbols") + target_link_libraries(${AVND_FX_TARGET} PRIVATE jthread "-Wl,-exported_symbols_list,${CMAKE_BINARY_DIR}/vst3_symbols") elseif(WIN32) if(NOT MSVC) target_link_libraries(${AVND_FX_TARGET} PRIVATE "-Wl,--version-script=${CMAKE_BINARY_DIR}/vst3_symbols") diff --git a/include/avnd/binding/standalone/oscquery_minimal_mapper.hpp b/include/avnd/binding/standalone/oscquery_minimal_mapper.hpp index 67a59298..906aa783 100644 --- a/include/avnd/binding/standalone/oscquery_minimal_mapper.hpp +++ b/include/avnd/binding/standalone/oscquery_minimal_mapper.hpp @@ -18,7 +18,11 @@ #include #include +#include #include +#if __has_include() +#include +#endif namespace standalone { template diff --git a/include/halp/controls_fmt.hpp b/include/halp/controls_fmt.hpp index 53f85bae..b60e2b50 100644 --- a/include/halp/controls_fmt.hpp +++ b/include/halp/controls_fmt.hpp @@ -19,7 +19,7 @@ struct formatter> } template - auto format(const halp::combo_pair& number, FormatContext& ctx) + auto format(const halp::combo_pair& number, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "combo: {}->{}", number.first, number.second); } @@ -35,7 +35,7 @@ struct formatter> } template - auto format(const halp::xy_type& number, FormatContext& ctx) + auto format(const halp::xy_type& number, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "xy: {}, {}", number.x, number.y); } @@ -51,7 +51,7 @@ struct formatter } template - auto format(const halp::color_type& number, FormatContext& ctx) + auto format(const halp::color_type& number, FormatContext& ctx) const { return fmt::format_to( ctx.out(), "rgba: {}, {}, {}, {}", number.r, number.g, number.b, number.a); @@ -68,7 +68,7 @@ struct formatter } template - auto format(const halp::impulse_type& number, FormatContext& ctx) + auto format(const halp::impulse_type& number, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "impulse"); } @@ -84,7 +84,7 @@ struct formatter> } template - auto format(const halp::range_slider_value& number, FormatContext& ctx) + auto format(const halp::range_slider_value& number, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "range: {} -> {}", number.start, number.end); }