Skip to content

Commit

Permalink
Add JuceLibraryCode/ to path for builds
Browse files Browse the repository at this point in the history
  • Loading branch information
austrianAudioJV committed Oct 23, 2023
1 parent c337bf0 commit 5c7621a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ add_subdirectory(JUCE)
# This adds the melatonin inspector module
add_subdirectory (modules/melatonin_inspector)

# !J! Not sure if this is the right approach to take
add_subdirectory (JuceLibraryCode)

# See `docs/CMake API.md` in the JUCE repo for all config options
juce_add_plugin("${PROJECT_NAME}"
# Icons for the standalone app
Expand Down Expand Up @@ -84,6 +87,7 @@ juce_add_plugin("${PROJECT_NAME}"
# Without running into ODR violations
add_library(SharedCode INTERFACE)


# C++20, please
# Use cxx_std_23 for C++23 (as of CMake v 3.20)
target_compile_features(SharedCode INTERFACE cxx_std_20)
Expand Down Expand Up @@ -141,6 +145,11 @@ target_link_libraries(SharedCode
juce::juce_recommended_lto_flags
juce::juce_recommended_warning_flags)

add_custom_target(host_header DEPENDS
$<TARGET_PROPERTY:${PROJECT_NAME},JUCE_GENERATED_SOURCES_DIRECTORY>/JuceHeader.h
)


# Link the JUCE plugin targets our SharedCode target
target_link_libraries("${PROJECT_NAME}" PRIVATE SharedCode)

Expand Down

0 comments on commit 5c7621a

Please sign in to comment.