CMake built VST3 plugin not working correctly

Hello guys! I’m a newbie in JUCE development and I’m trying to build a VST3 plugin according to examples on github.
I’ve taken a plugin from github that’s already been built using Projucer so everything should be fine in code perspective. Even .vst3 file from this repo works fine for me. But not when I’m building it.
The .vst3 itself appears in my cmake-build-release directory, but what’s strange is that it just can’t be found by Ableton and when I try to check it in pluginval I’m getting this message:

At the same time Standalone version builds and runs just fine.
Here’s my CMakeLists.txt:

cmake_minimum_required(VERSION 3.21)
project(GuitarStreamPlugin VERSION 1.0.0)

add_subdirectory(Ext/JUCE)

set(FORMATS "VST3" "Standalone")

juce_add_plugin(gsp
        VERSION 1.0.0
        COMPANY_NAME stratosky
        IS_SYNTH FALSE
        NEEDS_MIDI_INPUT FALSE
        NEEDS_MIDI_OUTPUT FALSE
        IS_MIDI_EFFECT FALSE
        COPY_PLUGIN_AFTER_BUILD FALSE
        PLUGIN_MANUFACTURER_CODE stky
        PLUGIN_CODE GuSP
        FORMATS ${FORMATS}
        VST3_CATEGORIES "Fx"
        BUNDLE_ID "com.stratosky.gsp"
        PLUGIN_NAME "GuitarStreamPlugin"
        PRODUCT_NAME "GuitarStream")

target_compile_features(gsp PRIVATE cxx_std_14)

juce_generate_juce_header(gsp)

add_subdirectory(Source)
add_subdirectory(Resources)

target_compile_definitions(gsp PUBLIC
        JUCE_VST3_CAN_REPLACE_VST2=0
        JUCE_WEB_BROWSER=0
        JUCE_USE_CURL=0)

target_link_libraries(gsp
        PRIVATE
        gsp_binary_data
        juce::juce_dsp
        juce::juce_audio_processors
        juce::juce_audio_plugin_client
        juce::juce_audio_utils
        PUBLIC
        juce::juce_recommended_config_flags
        juce::juce_recommended_lto_flags
        juce::juce_recommended_warning_flags)

Hope I can get some help here 'cause I just don’t know what can I do about it.

Are you installing the VST3 after building it? If not, other plugin hosts may not be able to find it.

Are you building and testing the plugin on the same computer?

Yep, I’m working in CLion and I ran the install through Build submenu. But it just seems to put JUCE dependencies in folder specified in cmake_install.cmake which has nothing to do with .vst3 in build folder. Or I just can’t get it :stuck_out_tongue:
And yes, building and testing on the same machine.

For me, JUCE makes a .vst3 folder that I see in windows explorer with the icon I added to my plugin. Maybe you or the pluginval mix that up? The actual .vst3 plugin for me is hidden deeper in that folder pluginname.vst3/Contents/x86_64-win/pluginname.vst3

Unfortunately no, I’m moving exactly the plugin itself manually from project build folder into CommonFiles/VST3, but that’s what I’m getting.
Do you just build the “name_VST | Release” without using install for plugin to work correctly?
Are you using the latest JUCE release? (6.1.6)

This won’t do the right thing for plugin builds. Instead, you can enable the COPY_PLUGIN_AFTER_BUILD option on the juce_add_plugin call. This will automatically copy the plugin to the correct location after building.

I’m not sure why pluginval wouldn’t be able to load your plugin. Assuming you’re on Windows, is there a chance pluginval was built for 32-bit but the plugin was built for 64-bit, or the other way round?

enable the COPY_PLUGIN_AFTER_BUILD option

I tried that too, but result stays the same. Maybe something goes wrong?
I’m getting “name.vst3/Contents/x86_64-win/name.vst3” hierarchy and nothing more with it in my system VST3 directory.

is there a chance pluginval was built for 32-bit but the plugin was built for 64-bit, or the other way round?

Don’t know much about pluginval but it seems unlikely.
Anyways, Ableton and Reaper are unable to detect the plugin too.

Well, thanks everyone, I kinda fixed it by changing the toolchain from default MinGW to Visual Studio in Build, Execution, Deployment settings and choosing amd64 architecture.
Both Ableton and pluginval are now doing alright with my plugin.
Now it’s set up like this:

1 Like