33#==============================================================================
44
55cmake_minimum_required (VERSION 3.22 )
6- project (OscilloscopePlugin VERSION 1.0.0) # Oscilloscope-Version
6+ if (NOT DEFINED FILE_VERSION)
7+ file (READ "${CMAKE_CURRENT_LIST_DIR } /../VERSION.md" FILE_VERSION )
8+ string (STRIP "${FILE_VERSION} " FILE_VERSION)
9+ endif ()
10+ project (OscilloscopePlugin VERSION ${FILE_VERSION} )
711
812# If we are on MacOS, we need to build for arm64 and x86_64
913if (APPLE )
1014 set (CMAKE_OSX_ARCHITECTURES "arm64;x86_64" )
15+ # Apparently macOS 12.0 is the minimum for reliable C++23 support
16+ # But we yolo it and just hope for the best on older macOS versions
17+ set (CMAKE_OSX_DEPLOYMENT_TARGET "10.13" )
1118endif ()
1219
1320# Option to disable update notification (default OFF)
1421option (DMT_DISABLE_UPDATE_NOTIFICATION "Disable update notification in the GUI" OFF )
1522
1623# JUCE setup
1724if (WIN32 )
18- set (OSCILLOSCOPE_PLUGIN_FORMATS "VST3;CLAP;Standalone" )
25+ set (OS_PLUGIN_FORMATS "VST3;CLAP;Standalone" )
1926elseif (APPLE )
20- set (OSCILLOSCOPE_PLUGIN_FORMATS "VST3;CLAP;AU;Standalone" )
27+ set (OS_PLUGIN_FORMATS "VST3;CLAP;AU;Standalone" )
2128elseif (UNIX )
22- set (OSCILLOSCOPE_PLUGIN_FORMATS "VST3;CLAP;LV2;Standalone" )
29+ set (OS_PLUGIN_FORMATS "VST3;CLAP;LV2;Standalone" )
2330else ()
24- set (OSCILLOSCOPE_PLUGIN_FORMATS "VST3;CLAP;Standalone" )
31+ set (OS_PLUGIN_FORMATS "VST3;CLAP;Standalone" )
2532endif ()
2633
2734juce_add_plugin (${PROJECT_NAME }
2835 PRODUCT_NAME "Oscilloscope"
2936 COMPANY_NAME "Dimethoxy"
30- FORMATS ${OSCILLOSCOPE_PLUGIN_FORMATS }
37+ FORMATS ${OS_PLUGIN_FORMATS }
3138 VST3_CATEGORIES "Fx" "Analyzer"
3239 IS_SYNTH FALSE
3340 NEEDS_MIDI_INPUT FALSE
@@ -38,7 +45,7 @@ juce_add_plugin(${PROJECT_NAME}
3845 PLUGIN_CODE DFLX
3946 LV2URI "https://dimethoxy.com/plugins/oscilloscope"
4047 BUNDLE_ID com.dimethoxy.oscilloscope
41- )
48+ )
4249
4350# Add the main source files
4451target_sources (${PROJECT_NAME }
@@ -50,40 +57,41 @@ target_sources(${PROJECT_NAME}
5057# Add the external libraries
5158target_include_directories (${PROJECT_NAME }
5259 PUBLIC
53- ${CMAKE_SOURCE_DIR } /external/dmt
60+ ${CMAKE_SOURCE_DIR } /src
61+ ${CMAKE_SOURCE_DIR } /src/dmt
5462 ${CMAKE_SOURCE_DIR } /external/melatonin_perfetto
5563 ${CMAKE_SOURCE_DIR } /external/tomlplusplus
5664)
5765
5866# Add fonts and icons as binary data so they can be used in the app
5967juce_add_binary_data (FontBinaryData
6068 SOURCES
61- ${CMAKE_SOURCE_DIR } /external /dmt/fonts/poppins/Poppins-Thin.ttf
62- ${CMAKE_SOURCE_DIR } /external /dmt/fonts/poppins/Poppins-ExtraLight.ttf
63- ${CMAKE_SOURCE_DIR } /external /dmt/fonts/poppins/Poppins-Light.ttf
64- ${CMAKE_SOURCE_DIR } /external /dmt/fonts/poppins/Poppins-Regular.ttf
65- ${CMAKE_SOURCE_DIR } /external /dmt/fonts/poppins/Poppins-Medium.ttf
66- ${CMAKE_SOURCE_DIR } /external /dmt/fonts/poppins/Poppins-SemiBold.ttf
67- ${CMAKE_SOURCE_DIR } /external /dmt/fonts/poppins/Poppins-Bold.ttf
68- ${CMAKE_SOURCE_DIR } /external /dmt/fonts/poppins/Poppins-ExtraBold.ttf
69- ${CMAKE_SOURCE_DIR } /external /dmt/fonts/poppins/Poppins-Black.ttf
70- ${CMAKE_SOURCE_DIR } /external /dmt/fonts/sedgwick_ave_display/SedgwickAveDisplay-Regular.ttf
71- ${CMAKE_SOURCE_DIR } /external /dmt/icons/speed.svg
72- ${CMAKE_SOURCE_DIR } /external /dmt/icons/back.svg
73- ${CMAKE_SOURCE_DIR } /external /dmt/icons/height.svg
74- ${CMAKE_SOURCE_DIR } /external /dmt/icons/thickness.svg
75- ${CMAKE_SOURCE_DIR } /external /dmt/icons/gear.svg
76- ${CMAKE_SOURCE_DIR } /external /dmt/icons/angles_up.svg
77- ${CMAKE_SOURCE_DIR } /external /dmt/icons/bypass.svg
78- ${CMAKE_SOURCE_DIR } /external /dmt/icons/download.svg
79- ${CMAKE_SOURCE_DIR } /external /dmt/icons/presets.svg
80- ${CMAKE_SOURCE_DIR } /external /dmt/icons/close.svg
81- ${CMAKE_SOURCE_DIR } /external /dmt/icons/reload.svg
82- ${CMAKE_SOURCE_DIR } /external /dmt/icons/save.svg
83- ${CMAKE_SOURCE_DIR } /external /dmt/icons/error.svg
84- ${CMAKE_SOURCE_DIR } /external /dmt/icons/warning.svg
85- ${CMAKE_SOURCE_DIR } /external /dmt/icons/success.svg
86- ${CMAKE_SOURCE_DIR } /external /dmt/icons/info.svg
69+ ${CMAKE_SOURCE_DIR } /src /dmt/fonts/poppins/Poppins-Thin.ttf
70+ ${CMAKE_SOURCE_DIR } /src /dmt/fonts/poppins/Poppins-ExtraLight.ttf
71+ ${CMAKE_SOURCE_DIR } /src /dmt/fonts/poppins/Poppins-Light.ttf
72+ ${CMAKE_SOURCE_DIR } /src /dmt/fonts/poppins/Poppins-Regular.ttf
73+ ${CMAKE_SOURCE_DIR } /src /dmt/fonts/poppins/Poppins-Medium.ttf
74+ ${CMAKE_SOURCE_DIR } /src /dmt/fonts/poppins/Poppins-SemiBold.ttf
75+ ${CMAKE_SOURCE_DIR } /src /dmt/fonts/poppins/Poppins-Bold.ttf
76+ ${CMAKE_SOURCE_DIR } /src /dmt/fonts/poppins/Poppins-ExtraBold.ttf
77+ ${CMAKE_SOURCE_DIR } /src /dmt/fonts/poppins/Poppins-Black.ttf
78+ ${CMAKE_SOURCE_DIR } /src /dmt/fonts/sedgwick_ave_display/SedgwickAveDisplay-Regular.ttf
79+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/speed.svg
80+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/back.svg
81+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/height.svg
82+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/thickness.svg
83+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/gear.svg
84+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/angles_up.svg
85+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/bypass.svg
86+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/download.svg
87+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/presets.svg
88+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/close.svg
89+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/reload.svg
90+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/save.svg
91+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/error.svg
92+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/warning.svg
93+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/success.svg
94+ ${CMAKE_SOURCE_DIR } /src /dmt/icons/info.svg
8795)
8896
8997# Link the libraries
@@ -141,7 +149,7 @@ message("JUCE header file generated!")
141149if (MSVC )
142150 target_compile_definitions (${PROJECT_NAME }
143151 PRIVATE
144- _SILENCE_CXX23_ALIGEND_STORAGE_DEPRECATION_WARNING
152+ _SILENCE_CXX23_ALIGNED_STORAGE_DEPRECATION_WARNING
145153 )
146154endif ()
147155
0 commit comments