Building LV2 Plugin with JUCE

Hello, I am currently trying to build my custom JUCE plugin in LV2 so that it can be used on MODEP. I am using cmake to build it.

I’m getting the following error regarding the URI setting:

/home/patch/Music/JUCEProject/JUCE_FirFilter/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp:86:38: error: static assertion failed: Your configured LV2 URI must include a leading scheme specifier.
   86 | static_assert (startsWithValidScheme (JucePlugin_LV2URI),
      |                ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/CMakeTest_LV2.dir/build.make:398: CMakeFiles/CMakeTest_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:240: CMakeFiles/CMakeTest_LV2.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

I’ve added the following two lines to CMakeLists.txt to build it on LV2:

juce_add_plugin(CMakeTest
    LV2_URI "urn:yuki-sato-0402:JUCE_FirFilter"
    LV2_SHARED_LIBRARY_NAME JUCE_FirFilter) 

I tried the LV2_URI to LV2_URI https://github.com/yuki-sato-0402/JUCE_FirFilter, but got the same result.

If you have any solutions, please let me know.
Thank you.

I changed LV2_URI to LV2URI and it solved the problem. Thank you.

1 Like

I made a verification video, so please take a look if you’d like.

2 Likes

Good stuff! If you are planning to add a GUI to the effect, check this out: GitHub - mod-audio/mod-sdk: SDK to implement the MOD gui interface

1 Like

Thank you! I’ll confirm that.