Skip to content

Commit

Permalink
chore: update build options
Browse files Browse the repository at this point in the history
  • Loading branch information
mttbernardini committed May 7, 2024
1 parent 947d227 commit 3161648
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 37 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
**/.DS_Store
Builds
build
build/
dist/
65 changes: 31 additions & 34 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,53 @@ add_subdirectory(External/JUCE)

# check which formats we want to build
set(FORMATS "VST3")
if (AAX_PATH)
list(APPEND FORMATS "AAX")
juce_set_aax_sdk_path(${AAX_PATH})
endif()

if (VST2_PATH)
list(APPEND FORMATS "VST2")
juce_set_vst2_sdk_path(${VST2_PATH})
endif()

if (APPLE)
list(APPEND FORMATS "AU")
endif()

# add the plugin targets
juce_add_plugin(frequalizer
VERSION "1.1.0"
COMPANY_NAME "foleysfinest"
PLUGIN_MANUFACTURER_CODE "FFAU"
PLUGIN_CODE "FqOS"
FORMATS ${FORMATS}
VST3_CATEGORIES "Fx" "Analyzer" "EQ"
AAX_CATEGORY "AAX_ePlugInCategory_EQ"
AU_MAIN_TYPE "kAudioUnitType_Effect"
COMPANY_WEBSITE "https://foleysfinest.com"
COMPANY_EMAIL "[email protected]"
BUNDLE_ID "com.foleysfinest.frequalizer"
PLUGIN_NAME "Frequalizer Free"
PRODUCT_NAME "Frequalizer")
COMPANY_NAME "foleysfinest"
PLUGIN_MANUFACTURER_CODE "TEOB"
PLUGIN_CODE "FqOS"
FORMATS ${FORMATS}
VST3_CATEGORIES "Fx" "Analyzer" "EQ"
AAX_CATEGORY "AAX_ePlugInCategory_EQ"
AU_MAIN_TYPE "kAudioUnitType_Effect"
COMPANY_WEBSITE "https://teobe.net"
COMPANY_EMAIL "[email protected]"
BUNDLE_ID "net.teobe.frequalizer"
PLUGIN_NAME "Frequalizer"
PRODUCT_NAME "Frequalizer"
)

# add the sources
add_subdirectory(Resources)
add_subdirectory(Source)

# add required flags
target_link_libraries(frequalizer PRIVATE juce::juce_recommended_warning_flags juce::juce_recommended_config_flags juce::juce_recommended_lto_flags)
target_link_libraries(frequalizer PRIVATE juce::juce_opengl juce::juce_dsp juce::juce_audio_utils)
target_compile_definitions(frequalizer
PUBLIC
JUCE_VST3_CAN_REPLACE_VST2=0
JUCE_WEB_BROWSER=0)
target_link_libraries(frequalizer
PRIVATE
# compiler flags
juce::juce_recommended_warning_flags
juce::juce_recommended_config_flags
juce::juce_recommended_lto_flags
# juce modules
juce::juce_opengl
juce::juce_dsp
juce::juce_audio_utils
)
target_compile_definitions(frequalizer
PUBLIC
JUCE_VST3_CAN_REPLACE_VST2=OFF
JUCE_WEB_BROWSER=OFF
)

# setup the copying to the output folder
if (APPLE)
set(COPY_FOLDER ${CMAKE_SOURCE_DIR}/Builds/MacOSX)
elseif(WIN32)
set(COPY_FOLDER ${CMAKE_SOURCE_DIR}/Builds/VisualStudio2015)
endif()
set(COPY_FOLDER ${CMAKE_SOURCE_DIR}/dist)

foreach(FORMAT ${FORMATS})
get_target_property(ARTEFACTS_DIR frequalizer_${FORMAT} LIBRARY_OUTPUT_DIRECTORY)
add_custom_command(TARGET frequalizer_${FORMAT} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${ARTEFACTS_DIR} ${COPY_FOLDER})
endforeach()
endforeach()

0 comments on commit 3161648

Please sign in to comment.