CMakeLists.txt (4445B)
1 cmake_minimum_required(VERSION 3.15) 2 set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment target") 3 set(CMAKE_CXX_STANDARD 17) 4 project(CHOWTapeModel VERSION 2.11.4) 5 6 if(IOS) 7 option(CHOWTAPE_BUILD_CLAP "Create a CLAP target for ChowTape" OFF) 8 else() 9 option(CHOWTAPE_BUILD_CLAP "Create a CLAP target for ChowTape" ON) 10 endif() 11 12 if (CHOWTAPE_BUILD_CLAP AND (CMAKE_VERSION VERSION_LESS 3.21.0)) 13 message(WARNING "CLAP builds require CMake version 3.21 or higher! To disable CLAP builds, run CMake configuration with \"-DCHOWTAPE_BUILD_CLAP=OFF\"") 14 endif() 15 16 add_subdirectory(modules) 17 include_directories(modules/RTNeural) 18 19 # set up plugin project 20 # juce_set_vst2_sdk_path(C:/SDKs/VST_SDK/VST2_SDK/) 21 # juce_set_aax_sdk_path(NONE) 22 # include_directories(ASIO_SDK) 23 24 if(IOS) 25 set(JUCE_FORMATS Standalone AUv3) 26 else() 27 set(JUCE_FORMATS AU VST3 Standalone) 28 endif() 29 30 # Build LV2 only on Linux 31 if(UNIX AND NOT APPLE) 32 message(STATUS "Building LV2 plugin format") 33 list(APPEND JUCE_FORMATS LV2) 34 endif() 35 36 # Build VST2 if SDK target exists 37 if(TARGET juce_vst2_sdk) 38 message(STATUS "Building VST2 plugin format") 39 list(APPEND JUCE_FORMATS VST) 40 endif() 41 42 # Build AAX if SDK target exists 43 if(TARGET juce_aax_sdk) 44 message(STATUS "Building AAX plugin format") 45 list(APPEND JUCE_FORMATS AAX) 46 endif() 47 48 juce_add_plugin(CHOWTapeModel 49 COMPANY_NAME chowdsp 50 PLUGIN_MANUFACTURER_CODE Chow 51 PLUGIN_CODE Jdox 52 FORMATS ${JUCE_FORMATS} 53 ProductName "CHOWTapeModel" 54 55 VST2_CATEGORY kPlugCategEffect 56 VST3_CATEGORIES Fx Distortion 57 AU_MAIN_TYPE kAudioUnitType_Effect 58 AAX_CATEGORY AAX_ePlugInCategory_Harmonic 59 60 LV2_URI https://github.com/jatinchowdhury18/AnalogTapeModel 61 62 ICON_BIG Source/GUI/Assets/logo.png 63 MICROPHONE_PERMISSION_ENABLED TRUE 64 IPHONE_SCREEN_ORIENTATIONS UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight 65 IPAD_SCREEN_ORIENTATIONS UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight 66 NEEDS_STORE_KIT TRUE 67 ) 68 69 # create JUCE header 70 juce_generate_juce_header(CHOWTapeModel) 71 72 add_subdirectory(Source) 73 74 if(CHOWTAPE_BUILD_CLAP) 75 clap_juce_extensions_plugin( 76 TARGET CHOWTapeModel 77 CLAP_ID "org.chowdsp.CHOWTapeModel" 78 CLAP_FEATURES audio-effect distortion win32-dpi-aware 79 CLAP_PROCESS_EVENTS_RESOLUTION_SAMPLES 64 80 CLAP_USE_JUCE_PARAMETER_RANGES DISCRETE 81 ) 82 endif() 83 84 include(modules/cmake/VersionInfo.cmake) 85 target_compile_definitions(CHOWTapeModel 86 PUBLIC 87 JUCE_DISPLAY_SPLASH_SCREEN=0 88 JUCE_REPORT_APP_USAGE=0 89 JUCE_WEB_BROWSER=0 90 JUCE_USE_CURL=0 91 JUCE_VST3_CAN_REPLACE_VST2=0 92 JUCE_JACK=1 93 JUCE_ALSA=1 94 CHOWDSP_AUTO_UPDATE=1 95 CHOWDSP_GIT_BRANCH="${GIT_BRANCH}" 96 CHOWDSP_GIT_COMMIT_HASH="${GIT_COMMIT_HASH}" 97 CHOWDSP_BUILD_FQDN="${PLUGIN_BUILD_FQDN}" 98 CHOWDSP_CXX_COMPILER_ID="${CMAKE_CXX_COMPILER_ID}" 99 CHOWDSP_CXX_COMPILER_VERSION="${CMAKE_CXX_COMPILER_VERSION}" 100 ) 101 102 target_link_libraries(CHOWTapeModel PUBLIC 103 juce_plugin_modules 104 ) 105 106 # we need these flags for notarization on MacOS 107 option(MACOS_RELEASE "Set build flags for MacOS Release" OFF) 108 if(MACOS_RELEASE) 109 message(STATUS "Setting MacOS release flags...") 110 set_target_properties(CHOWTapeModel_Standalone PROPERTIES 111 XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME YES) 112 endif() 113 114 if(IOS) 115 message(STATUS "Setting iOS-specific properties...") 116 117 foreach(target IN ITEMS BinaryData RTNeural juce_plugin_modules CHOWTapeModel CHOWTapeModel_Standalone CHOWTapeModel_AUv3) 118 set_target_properties(${target} 119 PROPERTIES 120 RUNTIME_OUTPUT_DIRECTORY "./" 121 ARCHIVE_OUTPUT_DIRECTORY "./" 122 LIBRARY_OUTPUT_DIRECTORY "./") 123 endforeach() 124 125 set_target_properties(CHOWTapeModel_Standalone PROPERTIES 126 XCODE_ATTRIBUTE_INSTALL_PATH "$(LOCAL_APPS_DIR)" 127 XCODE_ATTRIBUTE_SKIP_INSTALL "NO" 128 XCODE_ATTRIBUTE_ENABLE_IN_APP_PURCHASE "YES") 129 130 set_target_properties(CHOWTapeModel_AUv3 PROPERTIES 131 XCODE_ATTRIBUTE_INSTALL_PATH "$(LOCAL_APPS_DIR)/CHOWTapeModel.app/PlugIns" 132 XCODE_ATTRIBUTE_SKIP_INSTALL "NO" 133 XCODE_ATTRIBUTE_ENABLE_IN_APP_PURCHASE "YES") 134 endif()