AnalogTapeModel

Physical modelling signal processing for analog tape recording
Log | Files | Refs | Submodules | README | LICENSE

CMakeLists.txt (2984B)


      1 set(JUCE_PATH JUCE)
      2 if(CUSTOM_JUCE_PATH)
      3     set(JUCE_PATH "${CUSTOM_JUCE_PATH}")
      4 endif()
      5 
      6 add_subdirectory(${JUCE_PATH} juce)
      7 
      8 juce_add_modules(foleys_gui_magic)
      9 add_subdirectory(chowdsp_utils)
     10 
     11 subproject_version(JUCE juce_version)
     12 message(STATUS "VERSION for JUCE: ${juce_version}")
     13 subproject_version(chowdsp_utils chowdsp_version)
     14 message(STATUS "VERSION for chowdsp: ${chowdsp_version}")
     15 
     16 # Using RTNeural with XSimd backend
     17 set(RTNEURAL_XSIMD ON CACHE BOOL "Use RTNeural with XSimd backend" FORCE)
     18 add_definitions(-DUSE_XSIMD=1)
     19 add_subdirectory(RTNeural)
     20 
     21 include(cmake/WarningFlags.cmake)
     22 add_library(juce_plugin_modules STATIC)
     23 target_link_libraries(juce_plugin_modules
     24     PRIVATE
     25         BinaryData
     26         juce::juce_audio_utils
     27         juce::juce_audio_plugin_client
     28         chowdsp::chowdsp_dsp_utils
     29         chowdsp::chowdsp_sources
     30         chowdsp::chowdsp_plugin_base
     31         chowdsp::chowdsp_plugin_utils
     32         chowdsp::chowdsp_presets
     33         chowdsp::chowdsp_foleys
     34         foleys_gui_magic
     35         RTNeural
     36     PUBLIC
     37         juce::juce_recommended_config_flags
     38         juce::juce_recommended_lto_flags
     39         warning_flags
     40 )
     41 
     42 if(CHOWTAPE_BUILD_CLAP)
     43     add_subdirectory(clap-juce-extensions EXCLUDE_FROM_ALL)
     44     target_link_libraries(juce_plugin_modules
     45         PRIVATE
     46             chowdsp::chowdsp_clap_extensions
     47             clap_juce_extensions
     48     )
     49 endif()
     50 
     51 add_diagnostic_info(juce_plugin_modules)
     52 
     53 target_compile_definitions(juce_plugin_modules
     54     PUBLIC
     55         JUCE_DISPLAY_SPLASH_SCREEN=0
     56         JUCE_REPORT_APP_USAGE=0
     57         JUCE_WEB_BROWSER=0
     58         JUCE_USE_CURL=0
     59         JUCE_VST3_CAN_REPLACE_VST2=0
     60         JUCE_MODAL_LOOPS_PERMITTED=1
     61         JUCE_COREGRAPHICS_DRAW_ASYNC=1
     62         FOLEYS_SHOW_GUI_EDITOR_PALLETTE=0
     63         FOLEYS_ENABLE_BINARY_DATA=1
     64         FOLEYS_ENABLE_OPEN_GL_CONTEXT=0
     65         JucePlugin_Manufacturer="chowdsp"
     66         JucePlugin_VersionString="${CMAKE_PROJECT_VERSION}"
     67         JucePlugin_Name="${CMAKE_PROJECT_NAME}"
     68     INTERFACE
     69         $<TARGET_PROPERTY:juce_plugin_modules,COMPILE_DEFINITIONS>
     70 )
     71 
     72 target_include_directories(juce_plugin_modules
     73     PUBLIC
     74         RTNeural/modules/xsimd/include
     75     INTERFACE
     76         $<TARGET_PROPERTY:juce_plugin_modules,INCLUDE_DIRECTORIES>
     77 )
     78 
     79 set_target_properties(juce_plugin_modules PROPERTIES
     80     POSITION_INDEPENDENT_CODE TRUE
     81     VISIBILITY_INLINES_HIDDEN TRUE
     82     C_VISBILITY_PRESET hidden
     83     CXX_VISIBILITY_PRESET hidden
     84 )
     85 
     86 if(IOS)
     87     target_link_libraries(juce_plugin_modules PRIVATE juce::juce_product_unlocking)
     88     target_compile_definitions(juce_plugin_modules PUBLIC JUCE_IN_APP_PURCHASES=1)
     89 endif()
     90 
     91 # Enable OpenGL on Windows by default.
     92 if (WIN32)
     93     option(CHOWDSP_ENABLE_OPENGL "Enable OpenGL for this plugin" ON)
     94 else()
     95     option(CHOWDSP_ENABLE_OPENGL "Enable OpenGL for this plugin" OFF)
     96 endif()
     97 
     98 if(CHOWDSP_ENABLE_OPENGL)
     99     message(STATUS "Linking with OpenGL")
    100     target_link_libraries(juce_plugin_modules PRIVATE juce::juce_opengl)
    101 endif()