I am not sure why this is happening exactly, but I’m trying to implement CMake so that I can use a basic CI workflow for the project. Let me just preface this with I am new CMake as of today, so I am slowly learning how this works.
The problem is that I am successfully building the plugin with the CMake commands, but when I try to load the plugin in a host it won’t load. Currently I have the project setup as follows (if there is any other way to do it where I do not have to include JUCE as a submodule for CI then please let me know):
- MyPlugin
- ...
- Source
- PluginProcessor.cpp
- PluginEditor.cpp
- ...
- CMakeList.txt
- JUCE
- JUCE submodule for CMake
- CMakeList.txt
In the root directory’s CMakeList.txt:
cmake_minimum_required(VERSION 3.17)
project(MyPluginVERSION 0.0.1)
add_subdirectory(JUCE)
add_subdirectory(MyPlugin)
In MyPlugin’s directory, the CMakeLists.txt looks like:
juce_add_plugin(MyPlugin
VERSION "0.0.1"
COMPANY_NAME "Company Name"
IS_SYNTH TRUE
IS_MIDI_EFFECT FALSE
NEEDS_MIDI_INPUT TRUE
NEEDS_MIDI_OUTPUT FALSE
PLUGIN_MANUFACTURER_CODE C0de
PLUGIN_CODE C0de
FORMATS AU VST3
PRODUCT_NAME "My Plugin")
juce_generate_juce_header(MyPlugin)
target_sources(MyPlugin PRIVATE
Source/PluginEditor.cpp
Source/PluginProcessor.cpp)
target_compile_definitions(MyPlugin PUBLIC
JUCE_WEB_BROWSER=0
JUCE_USE_CURL=0
JUCE_VST3_CAN_REPLACE_VST2=0)
target_link_libraries(MyPlugin PRIVATE
juce::juce_audio_utils)
There is something wrong happening with my CMake configurations or something because building this new project with VS2019 and the Projucer works just fine. If I’m not mistaken, adding CI integration would mean that I have to use the JUCE as a git submodule (because how else would the VM get the code). I know CI changes according to the platform, but just in a more general sense.
Thanks!
