mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
CMake: Update example projects to use recommended targets
This commit is contained in:
parent
db23a1b2fd
commit
a98dc7553b
4 changed files with 51 additions and 31 deletions
|
|
@ -66,9 +66,10 @@ juce_add_plugin(AudioPluginExample
|
|||
# although it doesn't really affect executable targets). Finally, we supply a list of source files
|
||||
# that will be built into the target. This is a standard CMake command.
|
||||
|
||||
target_sources(AudioPluginExample PRIVATE
|
||||
PluginEditor.cpp
|
||||
PluginProcessor.cpp)
|
||||
target_sources(AudioPluginExample
|
||||
PRIVATE
|
||||
PluginEditor.cpp
|
||||
PluginProcessor.cpp)
|
||||
|
||||
# `target_compile_definitions` adds some preprocessor definitions to our target. In a Projucer
|
||||
# project, these might be passed in the 'Preprocessor Definitions' field. JUCE modules also make use
|
||||
|
|
@ -79,10 +80,10 @@ target_sources(AudioPluginExample PRIVATE
|
|||
|
||||
target_compile_definitions(AudioPluginExample
|
||||
PUBLIC
|
||||
# JUCE_WEB_BROWSER and JUCE_USE_CURL would be on by default, but you might not need them.
|
||||
JUCE_WEB_BROWSER=0 # If you remove this, add `NEEDS_WEB_BROWSER TRUE` to the `juce_add_plugin` call
|
||||
JUCE_USE_CURL=0 # If you remove this, add `NEEDS_CURL TRUE` to the `juce_add_plugin` call
|
||||
JUCE_VST3_CAN_REPLACE_VST2=0)
|
||||
# JUCE_WEB_BROWSER and JUCE_USE_CURL would be on by default, but you might not need them.
|
||||
JUCE_WEB_BROWSER=0 # If you remove this, add `NEEDS_WEB_BROWSER TRUE` to the `juce_add_plugin` call
|
||||
JUCE_USE_CURL=0 # If you remove this, add `NEEDS_CURL TRUE` to the `juce_add_plugin` call
|
||||
JUCE_VST3_CAN_REPLACE_VST2=0)
|
||||
|
||||
# If your target needs extra binary assets, you can add them here. The first argument is the name of
|
||||
# a new static library target that will include all the binary resources. There is an optional
|
||||
|
|
@ -99,6 +100,11 @@ target_compile_definitions(AudioPluginExample
|
|||
# linked automatically. If we'd generated a binary data target above, we would need to link to it
|
||||
# here too. This is a standard CMake command.
|
||||
|
||||
target_link_libraries(AudioPluginExample PRIVATE
|
||||
# AudioPluginData # If we'd created a binary data target, we'd link to it here
|
||||
juce::juce_audio_utils)
|
||||
target_link_libraries(AudioPluginExample
|
||||
PRIVATE
|
||||
# AudioPluginData # If we'd created a binary data target, we'd link to it here
|
||||
juce::juce_audio_utils
|
||||
PUBLIC
|
||||
juce::juce_recommended_config_flags
|
||||
juce::juce_recommended_lto_flags
|
||||
juce::juce_recommended_warning_flags)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue