Skip to content

Commit

Permalink
Avoid passing up var by using CACHE INTERNAL
Browse files Browse the repository at this point in the history
  • Loading branch information
firthm01 committed Mar 19, 2024
1 parent 976ea2e commit f8afca7
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ set(EPS_SHARED_DIR ${CMAKE_CURRENT_SOURCE_DIR}/shared)
set(JUCE_SUPPORT_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/shared/resources)
add_subdirectory(${EPS_SHARED_DIR}/version)

set(EPS_PLUGIN_TARGETS)
set(EPS_PLUGIN_TARGETS "" CACHE INTERNAL "")
add_subdirectory(ear-production-suite-plugins)
add_subdirectory(reaper-adm-extension)
add_subdirectory(reaper-adm-export-source-plugin)
Expand Down
9 changes: 5 additions & 4 deletions cmake_modules/juce_helpers.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function(add_juce_vst3_plugin PLUGIN_NAME)
set(options)
set(oneValueArgs IDE_FOLDER DESCRIPTION DISPLAY_NAME OUTPUT_NAME CODE_PREFIX CODE_SUFFIX)
set(oneValueArgs IDE_FOLDER DESCRIPTION DISPLAY_NAME OUTPUT_NAME CODE_PREFIX CODE_SUFFIX IS_EPS_PLUGIN)
set(multiValueArgs SOURCES)
cmake_parse_arguments(PLUGIN "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN} )
Expand Down Expand Up @@ -38,9 +38,10 @@ function(add_juce_vst3_plugin PLUGIN_NAME)
target_include_directories(${PLUGIN_NAME}_VST3 PRIVATE ${_SUPPORT_PATH}/ ${EPS_SHARED_DIR})
target_link_libraries(${PLUGIN_NAME}_VST3 PRIVATE Juce::VST3)

set(EPS_PLUGIN_TARGETS_COPY ${EPS_PLUGIN_TARGETS})
list(APPEND EPS_PLUGIN_TARGETS_COPY ${PLUGIN_NAME}_VST3 )
set(EPS_PLUGIN_TARGETS ${EPS_PLUGIN_TARGETS_COPY} PARENT_SCOPE)
if(PLUGIN_IS_EPS_PLUGIN)
list(APPEND EPS_PLUGIN_TARGETS ${PLUGIN_NAME}_VST3)
set(EPS_PLUGIN_TARGETS ${EPS_PLUGIN_TARGETS} CACHE INTERNAL "")
endif()

set_target_properties(${PLUGIN_NAME}_VST3 PROPERTIES
BUNDLE TRUE
Expand Down
1 change: 0 additions & 1 deletion ear-production-suite-plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ endif()

add_subdirectory(lib)
add_subdirectory(plugins)
set(EPS_PLUGIN_TARGETS ${EPS_PLUGIN_TARGETS} PARENT_SCOPE)
add_subdirectory(tools)
add_subdirectory(packaging)
if(EAR_PLUGINS_UNIT_TESTS)
Expand Down
1 change: 0 additions & 1 deletion ear-production-suite-plugins/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ add_subdirectory(hoa)
add_subdirectory(scene)
add_subdirectory(monitoring)
add_subdirectory(binaural_monitoring)
set(EPS_PLUGIN_TARGETS ${EPS_PLUGIN_TARGETS} PARENT_SCOPE)
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ add_juce_vst3_plugin(
CODE_SUFFIX "F0" # Speaker Monitoring suffixes start from A0 and increment. For bin, lets use F0 (Note FF is scene)
DISPLAY_NAME "EAR Binaural Monitoring"
DESCRIPTION "The binaural monitoring plugin"
OUTPUT_NAME "EAR Binaural Monitoring")
set(EPS_PLUGIN_TARGETS ${EPS_PLUGIN_TARGETS} PARENT_SCOPE)
OUTPUT_NAME "EAR Binaural Monitoring"
IS_EPS_PLUGIN ON)

target_link_libraries(ear_binaural_monitoring_VST3 PRIVATE ear-plugin-base ear-version bear)
install(TARGETS ear_binaural_monitoring_VST3 COMPONENT Plugins DESTINATION "${EPS_PLUGIN_INSTALL_PREFIX}ear-production-suite")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ add_juce_vst3_plugin(direct_speakers
CODE_SUFFIX "10"
DISPLAY_NAME "EAR DirectSpeakers"
DESCRIPTION "The metadata input plugin for channel-based audio"
OUTPUT_NAME "EAR DirectSpeakers")
set(EPS_PLUGIN_TARGETS ${EPS_PLUGIN_TARGETS} PARENT_SCOPE)
OUTPUT_NAME "EAR DirectSpeakers"
IS_EPS_PLUGIN ON)

target_link_libraries(direct_speakers_VST3 PRIVATE ear-plugin-base ear-version)
target_compile_definitions(direct_speakers_VST3 PRIVATE USE_NEW_DESIGN)

Expand Down
5 changes: 3 additions & 2 deletions ear-production-suite-plugins/plugins/hoa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ add_juce_vst3_plugin(hoa
CODE_SUFFIX "12"
DISPLAY_NAME "EAR HOA"
DESCRIPTION "The metadata input plugin for scene-based audio"
OUTPUT_NAME "EAR HOA")
set(EPS_PLUGIN_TARGETS ${EPS_PLUGIN_TARGETS} PARENT_SCOPE)
OUTPUT_NAME "EAR HOA"
IS_EPS_PLUGIN ON)

target_link_libraries(hoa_VST3 PRIVATE ear-plugin-base ear-version)

install_juce_vst3_plugin(hoa "${EPS_PLUGIN_INSTALL_PREFIX}ear-production-suite")
10 changes: 5 additions & 5 deletions ear-production-suite-plugins/plugins/monitoring/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,20 @@ function(add_monitoring_plugin SPEAKER_LAYOUT SPEAKER_LAYOUT_NAME AUDIO_PACK_FOR
add_juce_vst3_plugin(
ear_monitoring_${SPEAKER_LAYOUT}
SOURCES ${SOURCES_MONITORING} ${HEADERS_MONITORING}
CODE_SUFFIX ${PLUGIN_CODE_SUFFIX}
CODE_SUFFIX ${PLUGIN_CODE_SUFFIX}
DISPLAY_NAME "EAR Monitoring ${SPEAKER_LAYOUT}"
DESCRIPTION "The monitoring plugin (${SPEAKER_LAYOUT})"
OUTPUT_NAME "EAR Monitoring ${SPEAKER_LAYOUT}"
IDE_FOLDER ${IDE_FOLDER_PLUGINS}
)
set(EPS_PLUGIN_TARGETS ${EPS_PLUGIN_TARGETS} PARENT_SCOPE)
IS_EPS_PLUGIN ON)

target_compile_definitions(
ear_monitoring_${SPEAKER_LAYOUT}_VST3 PRIVATE
SPEAKER_LAYOUT="${SPEAKER_LAYOUT}"
SPEAKER_LAYOUT_NAME="${SPEAKER_LAYOUT_NAME}"
AUDIO_PACK_FORMAT_ID="${AUDIO_PACK_FORMAT_ID}"
AUDIO_PACK_FORMAT_ID="${AUDIO_PACK_FORMAT_ID}"
)

target_link_libraries(ear_monitoring_${SPEAKER_LAYOUT}_VST3 PRIVATE ear-plugin-base ear-version)
install_juce_vst3_plugin(ear_monitoring_${SPEAKER_LAYOUT} "${EPS_PLUGIN_INSTALL_PREFIX}ear-production-suite")
endfunction()
Expand All @@ -76,4 +77,3 @@ if(EAR_PLUGINS_BUILD_ALL_MONITORING_PLUGINS)
add_monitoring_plugin("4+7+0" "7.1+4H" "AP_00010017" "A9")
add_monitoring_plugin("2+7+0" "7.1+2H" "AP_00010016" "AA")
endif()
set(EPS_PLUGIN_TARGETS ${EPS_PLUGIN_TARGETS} PARENT_SCOPE)
5 changes: 3 additions & 2 deletions ear-production-suite-plugins/plugins/object/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ add_juce_vst3_plugin(object
CODE_SUFFIX "11"
DISPLAY_NAME "EAR Object"
DESCRIPTION "The metadata input plugin for objects"
OUTPUT_NAME "EAR Object")
set(EPS_PLUGIN_TARGETS ${EPS_PLUGIN_TARGETS} PARENT_SCOPE)
OUTPUT_NAME "EAR Object"
IS_EPS_PLUGIN ON)

target_include_directories(object_VST3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(object_VST3 PRIVATE ear-plugin-base ear-version)
install_juce_vst3_plugin(object "${EPS_PLUGIN_INSTALL_PREFIX}ear-production-suite")
5 changes: 3 additions & 2 deletions ear-production-suite-plugins/plugins/scene/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ add_juce_vst3_plugin(scene
CODE_SUFFIX "FF"
DISPLAY_NAME "EAR Scene"
DESCRIPTION "The scene plugin"
OUTPUT_NAME "EAR Scene")
set(EPS_PLUGIN_TARGETS ${EPS_PLUGIN_TARGETS} PARENT_SCOPE)
OUTPUT_NAME "EAR Scene"
IS_EPS_PLUGIN ON)

target_link_libraries(scene_VST3 PRIVATE ear-plugin-base ear-version)
install_juce_vst3_plugin(scene "${EPS_PLUGIN_INSTALL_PREFIX}ear-production-suite")

Expand Down

0 comments on commit f8afca7

Please sign in to comment.