Skip to content

Commit

Permalink
CLAP enable Surge by default (surge-synthesizer#5831)
Browse files Browse the repository at this point in the history
1. Add the juce extensions as a submodule
2. Update the cmake
3. Add zip stages for both linux and mac distribution
4. Put the claps in the zips (but not the instalelrs yet)
  • Loading branch information
baconpaul authored Jan 27, 2022
1 parent a4c1212 commit b75ca09
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@
[submodule "libs/sst/sst-cpputils"]
path = libs/sst/sst-cpputils
url = https://github.com/surge-synthesizer/sst-cpputils
[submodule "libs/clap-juce-extensions"]
path = libs/clap-juce-extensions
url = https://github.com/free-audio/clap-juce-extensions
1 change: 1 addition & 0 deletions libs/clap-juce-extensions
Submodule clap-juce-extensions added at 66ed91
5 changes: 1 addition & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ include(cmake/lib.cmake)

message(STATUS "Using JUCE from ${SURGE_JUCE_PATH}")
add_subdirectory(${SURGE_JUCE_PATH} ${CMAKE_BINARY_DIR}/JUCE EXCLUDE_FROM_ALL)
add_subdirectory(../libs/clap-juce-extensions clap-extensions EXCLUDE_FROM_ALL)

add_library(simde INTERFACE)
target_include_directories(simde INTERFACE ${CMAKE_SOURCE_DIR}/libs/simde)
Expand Down Expand Up @@ -46,10 +47,6 @@ target_compile_definitions(surge-juce INTERFACE

set(SURGE_JUCE_FORMATS VST3)

if (CLAP_JUCE_EXTENSIONS_ROOT)
add_subdirectory(${CLAP_JUCE_EXTENSIONS_ROOT} clap-extensions)
endif()

if(NOT SURGE_SKIP_STANDALONE)
list(APPEND SURGE_JUCE_FORMATS Standalone)
endif()
Expand Down
10 changes: 10 additions & 0 deletions src/cmake/lib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,19 @@ function(surge_make_installers)

if(APPLE)
run_installer_script(installer_mac/make_installer.sh)
add_custom_command(TARGET surge-xt-distribution
POST_BUILD
WORKING_DIRECTORY ${SURGE_PRODUCT_DIR}
COMMAND zip -r ${SURGE_XT_DIST_OUTPUT_DIR}/surge-xt-macos-${SXTVER}-pluginsonly.zip .
)
elseif(UNIX)
run_installer_script(installer_linux/make_deb.sh)
run_installer_script(installer_linux/make_rpm.sh)
add_custom_command(TARGET surge-xt-distribution
POST_BUILD
WORKING_DIRECTORY ${SURGE_PRODUCT_DIR}
COMMAND tar cvzf ${SURGE_XT_DIST_OUTPUT_DIR}/surge-xt-linux-${SXTVER}-pluginsonly.tgz .
)
elseif(WIN32)
add_custom_command(TARGET surge-xt-distribution
POST_BUILD
Expand Down
6 changes: 2 additions & 4 deletions src/surge-fx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
juce::juce_audio_processors
)

if (CLAP_JUCE_EXTENSIONS_ROOT)
clap_juce_extensions_plugin(TARGET surge-fx
CLAP_ID "org.surge-synth-team.surge-xt-fx")
endif()
clap_juce_extensions_plugin(TARGET surge-fx
CLAP_ID "org.surge-synth-team.surge-xt-fx")

surge_juce_package(${PROJECT_NAME} "Surge XT Effects")
8 changes: 3 additions & 5 deletions src/surge-xt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@ juce_add_plugin(${PROJECT_NAME}
FORMATS ${SURGE_JUCE_FORMATS}
)

if (CLAP_JUCE_EXTENSIONS_ROOT)
clap_juce_extensions_plugin(TARGET surge-xt
CLAP_ID "org.surge-synth-team.surge-xt")
target_sources(${PROJECT_NAME}_CLAP PRIVATE plugin_type_extensions/SurgeSynthClapExtensions.cpp)
endif()
clap_juce_extensions_plugin(TARGET surge-xt
CLAP_ID "org.surge-synth-team.surge-xt")
target_sources(${PROJECT_NAME}_CLAP PRIVATE plugin_type_extensions/SurgeSynthClapExtensions.cpp)

if(JUCE_ASIO_SUPPORT)
target_compile_definitions(${PROJECT_NAME} PUBLIC JUCE_ASIO=1)
Expand Down

0 comments on commit b75ca09

Please sign in to comment.