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

Only enable chowdsp::CPUMeter if juce_dsp is available #470

Merged
merged 2 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
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
59 changes: 30 additions & 29 deletions cmake/test/SetupCodeQuality.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,37 @@ target_compile_definitions(chowdsp_utils_codeql PRIVATE
)

target_link_libraries(chowdsp_utils_codeql PRIVATE
chowdsp_core
chowdsp_data_structures
chowdsp_json
chowdsp_listeners
chowdsp_reflection
chowdsp_serialization
chowdsp_units
chowdsp_buffers
chowdsp_compressor
chowdsp_dsp_data_structures
chowdsp_dsp_utils
chowdsp_eq
chowdsp_filters
chowdsp_math
chowdsp_modal_dsp
chowdsp_reverb
chowdsp_simd
chowdsp_sources
chowdsp_waveshapers
chowdsp_gui
chowdsp_visualizers
chowdsp_rhythm
chowdsp_parameters
chowdsp_plugin_base
chowdsp_plugin_state
chowdsp_plugin_utils
chowdsp_presets_v2
chowdsp_version
chowdsp_clap_extensions
chowdsp::chowdsp_core
chowdsp::chowdsp_data_structures
chowdsp::chowdsp_json
chowdsp::chowdsp_listeners
chowdsp::chowdsp_reflection
chowdsp::chowdsp_serialization
chowdsp::chowdsp_units
chowdsp::chowdsp_buffers
chowdsp::chowdsp_compressor
chowdsp::chowdsp_dsp_data_structures
chowdsp::chowdsp_dsp_utils
chowdsp::chowdsp_eq
chowdsp::chowdsp_filters
chowdsp::chowdsp_math
chowdsp::chowdsp_modal_dsp
chowdsp::chowdsp_reverb
chowdsp::chowdsp_simd
chowdsp::chowdsp_sources
chowdsp::chowdsp_waveshapers
chowdsp::chowdsp_gui
chowdsp::chowdsp_visualizers
chowdsp::chowdsp_rhythm
chowdsp::chowdsp_parameters
chowdsp::chowdsp_plugin_base
chowdsp::chowdsp_plugin_state
chowdsp::chowdsp_plugin_utils
chowdsp::chowdsp_presets_v2
chowdsp::chowdsp_version
chowdsp::chowdsp_clap_extensions
clap_juce_extensions
juce::juce_dsp
juce::juce_recommended_config_flags
juce::juce_recommended_lto_flags
juce::juce_recommended_warning_flags
Expand Down
7 changes: 7 additions & 0 deletions modules/gui/chowdsp_gui/PluginComponents/chowdsp_CPUMeter.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#pragma once

#if JUCE_MODULE_AVAILABLE_juce_dsp
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wimplicit-const-int-float-conversion")
#include <juce_dsp/juce_dsp.h>
JUCE_END_IGNORE_WARNINGS_GCC_LIKE

namespace chowdsp
{
/** Simple progress bar to visualize CPU usage */
Expand Down Expand Up @@ -27,3 +32,5 @@ class CPUMeter : public juce::Component,
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CPUMeter)
};
} // namespace chowdsp

#endif
5 changes: 4 additions & 1 deletion modules/gui/chowdsp_gui/chowdsp_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@

#include "InfoUtils/chowdsp_InfoProvider.cpp"

#include "PluginComponents/chowdsp_CPUMeter.cpp"
#include "PluginComponents/chowdsp_TitleComp.cpp"
#include "PluginComponents/chowdsp_TooltipComp.cpp"

#if JUCE_MODULE_AVAILABLE_juce_dsp
#include "PluginComponents/chowdsp_CPUMeter.cpp"
#endif

#if JUCE_MODULE_AVAILABLE_chowdsp_plugin_state
#include "PluginComponents/chowdsp_ParametersView.cpp"
#endif
Expand Down
6 changes: 0 additions & 6 deletions modules/gui/chowdsp_gui/chowdsp_gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@
#include <juce_audio_processors/juce_audio_processors.h>
#include <juce_gui_basics/juce_gui_basics.h>

#if JUCE_MODULE_AVAILABLE_juce_dsp
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wimplicit-const-int-float-conversion")
#include <juce_dsp/juce_dsp.h>
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
#endif

#include <chowdsp_core/chowdsp_core.h>

#if JUCE_MODULE_AVAILABLE_juce_opengl && CHOWDSP_ENABLE_OPEN_GL_CONTEXT
Expand Down
9 changes: 5 additions & 4 deletions tests/gui_tests/live_gui_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ juce_add_gui_app(live_gui_test)
setup_juce_test(live_gui_test)

target_link_libraries(live_gui_test PRIVATE
chowdsp_gui
chowdsp_plugin_base
chowdsp_presets
chowdsp_plugin_utils
juce::juce_dsp
chowdsp::chowdsp_gui
chowdsp::chowdsp_plugin_base
chowdsp::chowdsp_presets
chowdsp::chowdsp_plugin_utils
)

target_sources(live_gui_test PRIVATE
Expand Down
Loading