Anouncing "pluginval" an open-source cross-platform plugin validation tool

cmake -G "Visual Studio 17 2022" -S . -B Builds/Debug -DCMAKE_BUILD_TYPE=Debug

Alternatively just install Ninja, use “-G Ninja” which is more efficient and debug with CLion (and this is coming from a former VS fanboy …). Shout-out to benvining for encouraging me to move to CLion with his posts on the forum.

1 Like

I can’t learn a whole new IDE/debugging environment just for this one task.

How do I use CMake to get a VS2022 project?
Isn’t cmake supposed to generate that, or am I confused?

cmake -G "Visual Studio 17 2022"

PS. You will learn it in 5min and then start saving time…

Thanks, I missed that you had provided an answer.

So I issue this command from a cmd prompt? Where do I locate the files? What directory am I in when I issue this command? Thanks.

Yes. You have set the folder of the build files with -B Builds/Debug. With CLion you can save the cmake arguments, choose options with friendly dropdown menus, specify the output build folder and then click a button, so that keeps you out of the command line (as I said, this is coming from a previous VS heavy user ;P)

Thanks, I will take your CLIon advice under consideration, but for today I just really need to accomplish this task with VS.

I assume with the cmd prompt I first locate to the pluginval-1.0.4 directory, before issuing these commands?

Also, use the help of AI (any free chatgpt or copilot session will do) to start using CMake. It makes it so much easier.

Run cmake where Cmakelists.txt is placed. Everything that cmake needs is in Cmakelists.txt (well and the package manager files if you are using one for dependencies, like vcpkg).

1 Like

Thanks, I just tried that and it tells me:

CMake Error at CMakeLists.txt:25 (add_subdirectory):
  The source directory

    C:/Users/sk/Desktop/pluginval-1.0.4/modules/juce

  does not contain a CMakeLists.txt file.

Indeed, that folder is empty. I assume I have to download juce source into it first?

Run something like the following in the `pluginval-1.0.4` directory to grab JUCE module, though I would guess downloading JUCE directly would also work:

git submodule update --init --recursive

Thank you. I downloaded and installed git, which I have not used before.

I tried this from within the `pluginval-1.0.4` directory, but its’ not working:

C:\Users\sk\Desktop>chdir pluginval-1.0.4

C:\Users\sk\Desktop\pluginval-1.0.4>git submodule update --init --recursive
fatal: not a git repository (or any of the parent directories): .git

C:\Users\sk\Desktop\pluginval-1.0.4>git submodule update --init
fatal: not a git repository (or any of the parent directories): .git

Oh, I got it. You download the code directly. Could you please run the following directly on your desktop to clone the pluginval code:

git clone https://github.com/Tracktion/pluginval

Then, under the pluginval directory, you should be able to run:

git checkout v1.0.4 // it seems that the current tip of the develop load JUCE from CPM and the current README is outdated, so you may want the v1.0.4
// actually using CPM might be good so you can skip the following
// but I haven't updated pluginval for a while so cannot say much about that
git submodule update --init --recursive

Of course, the previous method might still work, i.e., directly put JUCE code under the modules/.

1 Like

Thank you! I finally got it to work and CMake to work.

One thing I noticed in the log:

-- Not building with VST2

What would I need to do to change this? The plugin that is crashing is the VST2 version.

EDIT:
Would I change this part in the CMakeLists.txt file:

target_compile_definitions(pluginval PRIVATE
    JUCE_PLUGINHOST_AU=1
    JUCE_PLUGINHOST_LADSPA=1
    JUCE_PLUGINHOST_VST3=1
    JUCE_PLUGINHOST_LV2=1
    JUCE_USE_CURL=0
    JUCE_WEB_BROWSER=0
    JUCE_MODAL_LOOPS_PERMITTED=1
    JUCE_GUI_BASICS_INCLUDE_XHEADERS=1
    VERSION="${CURRENT_VERSION}")

and add something like:

    JUCE_PLUGINHOST_VST2=1

or would it be:

    JUCE_PLUGINHOST_VST=1

EDIT:
no, that seems wrong. There is something in there:

if (DEFINED ENV{VST2_SDK_DIR})
    MESSAGE(STATUS "Building with VST2 SDK: $ENV{VST2_SDK_DIR}")
    juce_set_vst2_sdk_path($ENV{VST2_SDK_DIR})
else()
    MESSAGE(STATUS "Not building with VST2")
endif()

Where would that be defined? Thanks!

I seem to have figured it out, for the record.

You issue a command with a path to the VST2_SDK::

C:\Users\sk\Desktop\pluginval>set VST2_SDK_DIR=C:\Development\SDKs\VST2_SDK

Then you run CMake and it compiles withVST2:

-- Finished setting up juceaide
-- Building with VST2 SDK: C:\Development\SDKs\VST2_SDK
-- Configuring done (1.6s)
-- Generating done (0.5s)
-- Build files have been written to: C:/Users/sk/Desktop/pluginval/Builds/Debug

I’m having some difficulties compiling this; I have made a new thread about it here: