commit 86c9f520dbfa84126a2ceeab08666dbbba423b18 parent 93809760bc4140ba4f706b160693c26c6340b0a0 Author: dsp56300 <dsp56300@users.noreply.github.com> Date: Fri, 25 Mar 2022 21:04:12 +0100 EOL conversion Diffstat:
M | CMakeLists.txt | | | 170 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | source/jucePlugin/CMakeLists.txt | | | 260 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
2 files changed, 215 insertions(+), 215 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -1,85 +1,85 @@ -cmake_minimum_required(VERSION 3.15) - -# build a fat binary that runs on both intel and the new Apple M1 chip -set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "OS X Architectures") - -set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version") - -project(gearmulator VERSION 1.2.15) - -include(base.cmake) - -set(ASMJIT_STATIC TRUE) - -option(${PROJECT_NAME}_BUILD_JUCEPLUGIN "Build Juce plugin" on) - -add_subdirectory(source/dsp56300/source) -add_subdirectory(source/synthLib) -add_subdirectory(source/virusLib) -add_subdirectory(source/libresample) - -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/source/vstsdk2.4.2/public.sdk/source/vst2.x/audioeffect.h) - set(JUCE_GLOBAL_VST2_SDK_PATH ${CMAKE_CURRENT_SOURCE_DIR}/source/vstsdk2.4.2/) -endif() - -# ----------------- Juce based audio plugin - -set_property(GLOBAL PROPERTY USE_FOLDERS YES) -if(${PROJECT_NAME}_BUILD_JUCEPLUGIN) - set(JUCE_ENABLE_MODULE_SOURCE_GROUPS ON CACHE BOOL "" FORCE) - add_subdirectory(source/JUCE) - add_subdirectory(source/juceUiLib) - add_subdirectory(source/jucePlugin) -endif() - -# ----------------- Test Console - -add_executable(virusTestConsole) -target_sources(virusTestConsole PRIVATE source/virusTestConsole/virusTestConsole.cpp) -target_link_libraries(virusTestConsole PUBLIC virusLib) - -if(UNIX AND NOT APPLE) - target_link_libraries(virusTestConsole PUBLIC -static-libgcc -static-libstdc++) -endif() - -install(TARGETS virusTestConsole DESTINATION . COMPONENT testConsole) - -if(MSVC) - install(DIRECTORY deploy/win/ DESTINATION . COMPONENT testConsole) -else() - install(DIRECTORY deploy/linux/ DESTINATION . COMPONENT testConsole) -endif() - -# ----------------- CPack - -get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS) -list(REMOVE_ITEM CPACK_COMPONENTS_ALL "Unspecified") - -message("CMAKE_SYSTEM_NAME: " ${CMAKE_SYSTEM_NAME}) -message("CMAKE_SYSTEM_PROCESSOR: " ${CMAKE_SYSTEM_PROCESSOR}) - -if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}) -elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") - set(CPACK_SYSTEM_NAME "MacOS") -endif() - -set(CPACK_COMPONENTS_GROUPING IGNORE) -set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) - -set(CPACK_PACKAGE_CONTACT "The Usual Suspects") -set(CPACK_PACKAGE_VENDOR "The Usual Suspects") -set(CPACK_PACKAGE_NAME "DSP56300Emu") -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "DSP 56300 family emulator audio plugin") - -set(CPACK_DEB_COMPONENT_INSTALL ON) -set(CPACK_DEBIAN_PACKAGE_MAINTAINER "The Usual Suspects") -set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://dsp56300.wordpress.com") -set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) - -set(CPACK_RPM_COMPONENT_INSTALL ON) -set(CPACK_RPM_PACKAGE_AUTOREQ "yes") -set(CPACK_RPM_PACKAGE_URL ${CPACK_DEBIAN_PACKAGE_HOMEPAGE}) -set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) - -include(CPack) +cmake_minimum_required(VERSION 3.15) + +# build a fat binary that runs on both intel and the new Apple M1 chip +set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "OS X Architectures") + +set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version") + +project(gearmulator VERSION 1.2.15) + +include(base.cmake) + +set(ASMJIT_STATIC TRUE) + +option(${PROJECT_NAME}_BUILD_JUCEPLUGIN "Build Juce plugin" on) + +add_subdirectory(source/dsp56300/source) +add_subdirectory(source/synthLib) +add_subdirectory(source/virusLib) +add_subdirectory(source/libresample) + +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/source/vstsdk2.4.2/public.sdk/source/vst2.x/audioeffect.h) + set(JUCE_GLOBAL_VST2_SDK_PATH ${CMAKE_CURRENT_SOURCE_DIR}/source/vstsdk2.4.2/) +endif() + +# ----------------- Juce based audio plugin + +set_property(GLOBAL PROPERTY USE_FOLDERS YES) +if(${PROJECT_NAME}_BUILD_JUCEPLUGIN) + set(JUCE_ENABLE_MODULE_SOURCE_GROUPS ON CACHE BOOL "" FORCE) + add_subdirectory(source/JUCE) + add_subdirectory(source/juceUiLib) + add_subdirectory(source/jucePlugin) +endif() + +# ----------------- Test Console + +add_executable(virusTestConsole) +target_sources(virusTestConsole PRIVATE source/virusTestConsole/virusTestConsole.cpp) +target_link_libraries(virusTestConsole PUBLIC virusLib) + +if(UNIX AND NOT APPLE) + target_link_libraries(virusTestConsole PUBLIC -static-libgcc -static-libstdc++) +endif() + +install(TARGETS virusTestConsole DESTINATION . COMPONENT testConsole) + +if(MSVC) + install(DIRECTORY deploy/win/ DESTINATION . COMPONENT testConsole) +else() + install(DIRECTORY deploy/linux/ DESTINATION . COMPONENT testConsole) +endif() + +# ----------------- CPack + +get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS) +list(REMOVE_ITEM CPACK_COMPONENTS_ALL "Unspecified") + +message("CMAKE_SYSTEM_NAME: " ${CMAKE_SYSTEM_NAME}) +message("CMAKE_SYSTEM_PROCESSOR: " ${CMAKE_SYSTEM_PROCESSOR}) + +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}) +elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + set(CPACK_SYSTEM_NAME "MacOS") +endif() + +set(CPACK_COMPONENTS_GROUPING IGNORE) +set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) + +set(CPACK_PACKAGE_CONTACT "The Usual Suspects") +set(CPACK_PACKAGE_VENDOR "The Usual Suspects") +set(CPACK_PACKAGE_NAME "DSP56300Emu") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "DSP 56300 family emulator audio plugin") + +set(CPACK_DEB_COMPONENT_INSTALL ON) +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "The Usual Suspects") +set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://dsp56300.wordpress.com") +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + +set(CPACK_RPM_COMPONENT_INSTALL ON) +set(CPACK_RPM_PACKAGE_AUTOREQ "yes") +set(CPACK_RPM_PACKAGE_URL ${CPACK_DEBIAN_PACKAGE_HOMEPAGE}) +set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) + +include(CPack) diff --git a/source/jucePlugin/CMakeLists.txt b/source/jucePlugin/CMakeLists.txt @@ -1,130 +1,130 @@ - -cmake_minimum_required(VERSION 3.15) -project(jucePlugin VERSION ${CMAKE_PROJECT_VERSION}) - -option(${CMAKE_PROJECT_NAME}_BUILD_FX_PLUGIN "Build FX plugin variants" off) - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_SOURCE_DIR}/version.h) - -if(JUCE_GLOBAL_VST2_SDK_PATH) - set(VST "VST") -else() - set(VST "") -endif() - -set(SOURCES - parameterDescriptions_C.json - PluginEditor.cpp - PluginEditor.h - PluginProcessor.cpp - PluginProcessor.h - VirusController.cpp - VirusController.h - VirusParameter.cpp - VirusParameter.h - VirusParameterBinding.cpp - VirusParameterBinding.h - VirusParameterDescription.cpp - VirusParameterDescription.h - VirusParameterDescriptions.cpp - VirusParameterDescriptions.h - version.h -) - -set(SOURCES_UI3 - ui3/FxPage.cpp - ui3/FxPage.h - ui3/MidiPorts.cpp - ui3/MidiPorts.h - ui3/Parts.cpp - ui3/Parts.h - ui3/PatchBrowser.cpp - ui3/PatchBrowser.h - ui3/Tabs.cpp - ui3/Tabs.h - ui3/VirusEditor.cpp - ui3/VirusEditor.h -) - -# https://forum.juce.com/t/help-needed-using-binarydata-with-cmake-juce-6/40486 -# "This might be because the BinaryData files are generated during the build, so the IDE may not be able to find them until the build has been run once (and even then, some IDEs might need a bit of a nudge to re-index the binary directory…)" -SET(ASSETS - "parameterDescriptions_C.json" -) - -include(skins/Hoverland/assets.cmake) -include(skins/Trancy/assets.cmake) - -macro(createJucePlugin targetName productName isSynth plugin4CC binaryDataProject componentName) - juce_add_plugin(${targetName} - # VERSION ... # Set this if the plugin version is different to the project version - # ICON_BIG ... # ICON_* arguments specify a path to an image file to use as an icon for the Standalone - # ICON_SMALL ... - COMPANY_NAME "The Usual Suspects" # Specify the name of the plugin's author - IS_SYNTH ${isSynth} # Is this a synth or an effect? - NEEDS_MIDI_INPUT TRUE # Does the plugin need midi input? - NEEDS_MIDI_OUTPUT TRUE # Does the plugin need midi output? - IS_MIDI_EFFECT FALSE # Is this plugin a MIDI effect? - EDITOR_WANTS_KEYBOARD_FOCUS TRUE # Does the editor need keyboard focus? - COPY_PLUGIN_AFTER_BUILD FALSE # Should the plugin be installed to a default location after building? - PLUGIN_MANUFACTURER_CODE TusP # A four-character manufacturer id with at least one upper-case character - PLUGIN_CODE ${plugin4CC} # A unique four-character plugin id with exactly one upper-case character - # GarageBand 10.3 requires the first letter to be upper-case, and the remaining letters to be lower-case - FORMATS AU VST3 ${VST} Standalone # The formats to build. Other valid formats are: AAX Unity VST AU AUv3 - PRODUCT_NAME ${productName} # The name of the final executable, which can differ from the target name - ) - - target_sources(${targetName} PRIVATE ${SOURCES} ${SOURCES_UI3}) - - source_group("source" FILES ${SOURCES}) - source_group("source\\ui3" FILES ${SOURCES_UI3}) - - target_compile_definitions(${targetName} - 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_WIN_PER_MONITOR_DPI_AWARE=0 - ) - - target_link_libraries(${targetName} - PRIVATE - ${binaryDataProject} - juceUiLib - juce::juce_audio_utils - juce::juce_cryptography - PUBLIC - virusLib - #juce::juce_recommended_config_flags - #juce::juce_recommended_lto_flags - #juce::juce_recommended_warning_flags - ) - - if(UNIX AND NOT APPLE) - target_link_libraries(${targetName} PUBLIC -static-libgcc -static-libstdc++) - endif() - - if(MSVC OR APPLE) - if(JUCE_GLOBAL_VST2_SDK_PATH) - install(TARGETS ${targetName}_VST DESTINATION . COMPONENT VST2${componentName}) - endif() - install(TARGETS ${targetName}_VST3 DESTINATION . COMPONENT VST3${componentName}) - if(APPLE) - install(TARGETS ${targetName}_AU DESTINATION . COMPONENT AU${componentName}) - endif() - elseif(UNIX) - if(JUCE_GLOBAL_VST2_SDK_PATH) - install(TARGETS ${targetName}_VST LIBRARY DESTINATION /usr/local/lib/lxvst/ COMPONENT VST2${componentName}) - endif() - install(TARGETS ${targetName}_VST3 LIBRARY DESTINATION /usr/local/lib/vst3/ COMPONENT VST3${componentName}) - endif() -endmacro() - -juce_add_binary_data(jucePlugin_BinaryData${postfix} SOURCES ${ASSETS} ${ASSETS_VirusC_Hoverland} ${ASSETS_VirusC_Trancy}) - -createJucePlugin(jucePlugin "DSP56300Emu" TRUE "TusV" jucePlugin_BinaryData${postfix} "") - -if(${CMAKE_PROJECT_NAME}_BUILD_FX_PLUGIN) - createJucePlugin(jucePlugin_FX "DSP56300EmuFX" FALSE "TusF" jucePlugin_BinaryData${postfix} "_FX") -endif() + +cmake_minimum_required(VERSION 3.15) +project(jucePlugin VERSION ${CMAKE_PROJECT_VERSION}) + +option(${CMAKE_PROJECT_NAME}_BUILD_FX_PLUGIN "Build FX plugin variants" off) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_SOURCE_DIR}/version.h) + +if(JUCE_GLOBAL_VST2_SDK_PATH) + set(VST "VST") +else() + set(VST "") +endif() + +set(SOURCES + parameterDescriptions_C.json + PluginEditor.cpp + PluginEditor.h + PluginProcessor.cpp + PluginProcessor.h + VirusController.cpp + VirusController.h + VirusParameter.cpp + VirusParameter.h + VirusParameterBinding.cpp + VirusParameterBinding.h + VirusParameterDescription.cpp + VirusParameterDescription.h + VirusParameterDescriptions.cpp + VirusParameterDescriptions.h + version.h +) + +set(SOURCES_UI3 + ui3/FxPage.cpp + ui3/FxPage.h + ui3/MidiPorts.cpp + ui3/MidiPorts.h + ui3/Parts.cpp + ui3/Parts.h + ui3/PatchBrowser.cpp + ui3/PatchBrowser.h + ui3/Tabs.cpp + ui3/Tabs.h + ui3/VirusEditor.cpp + ui3/VirusEditor.h +) + +# https://forum.juce.com/t/help-needed-using-binarydata-with-cmake-juce-6/40486 +# "This might be because the BinaryData files are generated during the build, so the IDE may not be able to find them until the build has been run once (and even then, some IDEs might need a bit of a nudge to re-index the binary directory…)" +SET(ASSETS + "parameterDescriptions_C.json" +) + +include(skins/Hoverland/assets.cmake) +include(skins/Trancy/assets.cmake) + +macro(createJucePlugin targetName productName isSynth plugin4CC binaryDataProject componentName) + juce_add_plugin(${targetName} + # VERSION ... # Set this if the plugin version is different to the project version + # ICON_BIG ... # ICON_* arguments specify a path to an image file to use as an icon for the Standalone + # ICON_SMALL ... + COMPANY_NAME "The Usual Suspects" # Specify the name of the plugin's author + IS_SYNTH ${isSynth} # Is this a synth or an effect? + NEEDS_MIDI_INPUT TRUE # Does the plugin need midi input? + NEEDS_MIDI_OUTPUT TRUE # Does the plugin need midi output? + IS_MIDI_EFFECT FALSE # Is this plugin a MIDI effect? + EDITOR_WANTS_KEYBOARD_FOCUS TRUE # Does the editor need keyboard focus? + COPY_PLUGIN_AFTER_BUILD FALSE # Should the plugin be installed to a default location after building? + PLUGIN_MANUFACTURER_CODE TusP # A four-character manufacturer id with at least one upper-case character + PLUGIN_CODE ${plugin4CC} # A unique four-character plugin id with exactly one upper-case character + # GarageBand 10.3 requires the first letter to be upper-case, and the remaining letters to be lower-case + FORMATS AU VST3 ${VST} Standalone # The formats to build. Other valid formats are: AAX Unity VST AU AUv3 + PRODUCT_NAME ${productName} # The name of the final executable, which can differ from the target name + ) + + target_sources(${targetName} PRIVATE ${SOURCES} ${SOURCES_UI3}) + + source_group("source" FILES ${SOURCES}) + source_group("source\\ui3" FILES ${SOURCES_UI3}) + + target_compile_definitions(${targetName} + 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_WIN_PER_MONITOR_DPI_AWARE=0 + ) + + target_link_libraries(${targetName} + PRIVATE + ${binaryDataProject} + juceUiLib + juce::juce_audio_utils + juce::juce_cryptography + PUBLIC + virusLib + #juce::juce_recommended_config_flags + #juce::juce_recommended_lto_flags + #juce::juce_recommended_warning_flags + ) + + if(UNIX AND NOT APPLE) + target_link_libraries(${targetName} PUBLIC -static-libgcc -static-libstdc++) + endif() + + if(MSVC OR APPLE) + if(JUCE_GLOBAL_VST2_SDK_PATH) + install(TARGETS ${targetName}_VST DESTINATION . COMPONENT VST2${componentName}) + endif() + install(TARGETS ${targetName}_VST3 DESTINATION . COMPONENT VST3${componentName}) + if(APPLE) + install(TARGETS ${targetName}_AU DESTINATION . COMPONENT AU${componentName}) + endif() + elseif(UNIX) + if(JUCE_GLOBAL_VST2_SDK_PATH) + install(TARGETS ${targetName}_VST LIBRARY DESTINATION /usr/local/lib/lxvst/ COMPONENT VST2${componentName}) + endif() + install(TARGETS ${targetName}_VST3 LIBRARY DESTINATION /usr/local/lib/vst3/ COMPONENT VST3${componentName}) + endif() +endmacro() + +juce_add_binary_data(jucePlugin_BinaryData${postfix} SOURCES ${ASSETS} ${ASSETS_VirusC_Hoverland} ${ASSETS_VirusC_Trancy}) + +createJucePlugin(jucePlugin "DSP56300Emu" TRUE "TusV" jucePlugin_BinaryData${postfix} "") + +if(${CMAKE_PROJECT_NAME}_BUILD_FX_PLUGIN) + createJucePlugin(jucePlugin_FX "DSP56300EmuFX" FALSE "TusF" jucePlugin_BinaryData${postfix} "_FX") +endif()