115 lines
3.3 KiB
CMake
115 lines
3.3 KiB
CMake
cmake_minimum_required(VERSION 3.22)
|
|
project(CrilleBassStrip VERSION 1.0.0 LANGUAGES C CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
JUCE
|
|
GIT_REPOSITORY https://github.com/juce-framework/JUCE.git
|
|
GIT_TAG 8.0.6
|
|
GIT_SHALLOW TRUE
|
|
)
|
|
FetchContent_MakeAvailable(JUCE)
|
|
|
|
set(VST3_INSTALL_DIR "C:/Program Files/Common Files/VST3")
|
|
set(RELEASE_DIR "${CMAKE_SOURCE_DIR}/Release")
|
|
set(ASIO_SDK_DIR "C:/SDK/asio" CACHE PATH "Path to the Steinberg ASIO SDK")
|
|
|
|
juce_add_plugin(CrilleBassStrip
|
|
COMPANY_NAME "Crille Audio"
|
|
BUNDLE_ID "org.crilleaudio.crillebassstrip"
|
|
PLUGIN_MANUFACTURER_CODE Cril
|
|
PLUGIN_CODE CbSt
|
|
FORMATS VST3
|
|
PRODUCT_NAME "Crille Bass Strip"
|
|
COPY_PLUGIN_AFTER_BUILD TRUE
|
|
VST3_COPY_DIR "${VST3_INSTALL_DIR}"
|
|
)
|
|
|
|
juce_generate_juce_header(CrilleBassStrip)
|
|
|
|
target_sources(CrilleBassStrip PRIVATE
|
|
Source/PluginProcessor.cpp
|
|
Source/PluginProcessor.h
|
|
Source/PluginEditor.cpp
|
|
Source/PluginEditor.h
|
|
)
|
|
|
|
target_compile_definitions(CrilleBassStrip PUBLIC
|
|
JUCE_WEB_BROWSER=0
|
|
JUCE_USE_CURL=0
|
|
JUCE_VST3_CAN_REPLACE_VST2=0
|
|
JUCE_ASIO=1
|
|
)
|
|
|
|
target_include_directories(CrilleBassStrip PRIVATE
|
|
"${ASIO_SDK_DIR}/common"
|
|
"${ASIO_SDK_DIR}/host"
|
|
"${ASIO_SDK_DIR}/host/pc"
|
|
)
|
|
|
|
target_link_libraries(CrilleBassStrip PRIVATE
|
|
juce::juce_audio_utils
|
|
juce::juce_dsp
|
|
PUBLIC
|
|
juce::juce_recommended_config_flags
|
|
juce::juce_recommended_lto_flags
|
|
juce::juce_recommended_warning_flags
|
|
)
|
|
|
|
add_custom_command(TARGET CrilleBassStrip_VST3 POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${RELEASE_DIR}/Windows/VST3"
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
"$<TARGET_FILE_DIR:CrilleBassStrip_VST3>/../.."
|
|
"${RELEASE_DIR}/Windows/VST3/Crille Bass Strip.vst3"
|
|
COMMENT "Copying Windows VST3 to Release"
|
|
)
|
|
|
|
juce_add_gui_app(CrilleBassStripApp
|
|
PRODUCT_NAME "Crille Bass Strip"
|
|
COMPANY_NAME "Crille Audio"
|
|
BUNDLE_ID "org.crilleaudio.crillebassstrip"
|
|
)
|
|
|
|
juce_generate_juce_header(CrilleBassStripApp)
|
|
|
|
target_sources(CrilleBassStripApp PRIVATE
|
|
Source/StandaloneMain.cpp
|
|
Source/StandaloneMain.h
|
|
Source/PluginProcessor.cpp
|
|
Source/PluginProcessor.h
|
|
Source/PluginEditor.cpp
|
|
Source/PluginEditor.h
|
|
)
|
|
|
|
target_compile_definitions(CrilleBassStripApp PRIVATE
|
|
JUCE_WEB_BROWSER=0
|
|
JUCE_USE_CURL=0
|
|
JUCE_ASIO=1
|
|
)
|
|
|
|
target_include_directories(CrilleBassStripApp PRIVATE
|
|
"${ASIO_SDK_DIR}/common"
|
|
"${ASIO_SDK_DIR}/host"
|
|
"${ASIO_SDK_DIR}/host/pc"
|
|
)
|
|
|
|
target_link_libraries(CrilleBassStripApp PRIVATE
|
|
juce::juce_audio_utils
|
|
juce::juce_dsp
|
|
PUBLIC
|
|
juce::juce_recommended_config_flags
|
|
juce::juce_recommended_lto_flags
|
|
juce::juce_recommended_warning_flags
|
|
)
|
|
|
|
add_custom_command(TARGET CrilleBassStripApp POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${RELEASE_DIR}/Windows/Standalone"
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
"$<TARGET_FILE:CrilleBassStripApp>"
|
|
"${RELEASE_DIR}/Windows/Standalone/Crille Bass Strip.exe"
|
|
COMMENT "Copying Windows standalone app to Release"
|
|
)
|