Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional audio flags #136

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

option(SST_JUCEGUI_BUILD_EXAMPLES "Add targets for building and running sst-filters examples" FALSE)
option(SST_JUCEGUI_SKIP_AUDIO "Skip JUCE audio definitions" TRUE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the default be false to retain old behavior?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but since the examples build I think it is fine as is. Let's not insert them unless upstream wants them by default. then no surge change required even! if you agree let me know and we can merge this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im a subscriber to less is more

esp because this PR is bc macros were redefined, and because this library will be a common upstream dependency, less macro definitions will prevent future issues?

forward progress! i say merge as is but i wouldn't die on this hill.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know, most of the upstream ones are in the clap juce shim branch anyway. I think it is just vestigial. So yeah leave it as is.


if (${SST_JUCEGUI_BUILD_EXAMPLES})
if (${PROJECT_IS_TOP_LEVEL})
Expand All @@ -26,7 +27,7 @@ if (${SST_JUCEGUI_BUILD_EXAMPLES})

if (NOT TARGET juce::juce_gui_basics)
if (NOT DEFINED SST_JUCEGUI_JUCE_VERSION)
set(SST_JUCEGUI_JUCE_VERSION 7.0.12)
set(SST_JUCEGUI_JUCE_VERSION 8.0.4)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before merge i want to point out that i have no idea if this upgrade will break any downstream dependencies.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won't. We also CI test with 7 and 8 so this is just a default.

endif()
message(STATUS "Downloading JUCE ${SST_JUCEGUI_JUCE_VERSION}")
set(FETCHCONTENT_QUIET FALSE)
Expand Down Expand Up @@ -128,13 +129,23 @@ else()
else()
add_library(sst-jucegui-juce-requirements INTERFACE)
target_link_libraries(sst-jucegui-juce-requirements INTERFACE juce::juce_gui_basics)

target_compile_definitions(sst-jucegui-juce-requirements INTERFACE
JUCE_USE_CURL=0
JUCE_WEB_BROWSER=0
JUCE_USE_CURL=0
JUCE_WEB_BROWSER=0
)

if(NOT ${SST_JUCEGUI_SKIP_AUDIO})
target_compile_definitions(sst-jucegui-juce-requirements INTERFACE
JUCE_JACK=0
JUCE_ALSA=0
JUCE_WASAPI=0
JUCE_DIRECTSOUND=0)
JUCE_DIRECTSOUND=0
)
else()
message(STATUS "SST_JUCEGUI_SKIP_AUDIO is set to TRUE. Audio flags are skipped.")
endif()

endif()
endif()

Expand Down
Loading