CMake juce_lv2_helper appeared

Hello JUCE team,

Since updating to JUCE, a new CMake target juce_lv2_helper appeared without us explicitly adding it ourselves. Our project isn’t an audio plug-in client or host, so we don’t need this target.

We do not want this irrelevant target to appear in our IDE or be automatically included in our build processes.

Please can you update JUCE to fix this.




I’ve just encountered this issue as well, and further it has a broad reach that has side effects for other targets. For example, when compiling for iOS using a CMake toolchain, I am getting:

error: Bundle identifier is missing. juce_lv2_helper doesn't have a bundle identifier. Add a value for PRODUCT_BUNDLE_IDENTIFIER in the build settings editor.

@jellebakker in case it helps, a workaround I’m trying out in my fork of JUCE is to comment out the last line of the top-level CMakeLists.txt, and the entirety of the CMakeLists.txt in modules/juce_audio_plugin_client
Not sure yet what side effects this might cause, if any…

The juce_lv2_helper target is now excluded from the “all” target by default for projects that include JUCE as a subproject. This means that it will only build if it is specifically requested, or if it is needed to generate an LV2 plugin.

Please let me know if you still encounter problems with this change applied.


Thank you @reuk for applying that fix!

However, even in the latest JUCE from the develop branch CLion still shows the lv2 target. Any chance to have some flag where it’s not configured at all?

No, the target is currently added for all projects that include JUCE as a subproject. Does this cause any problems?

It just adds clutter to project with many targets. It would be great if a flag could be added so it’s not even configured, maybe an option that’s on by default?


Our software is open source and the presence of this target confuses customers.

Thanks for explaining. The LV2 helper should now only be enabled if an LV2 plugin is specifically requested:


Hey @reuk, thank you for this fix!

However I’m testing now with the latest develop and I can still see the lv2 helper in both CLion and Xcode on Mac.

How are you building JUCE?

The target will still be enabled when building JUCE as a top-level project, because it needs to be present when running cmake --install.

If you include JUCE as a subproject inside another project, then the target will only be enabled when an LV2 target is added.

I’m using add_subdirectory(JUCE) and don’t have any LV2 targets added…

It might be worth cleaning your build folder and IDE files. Sometimes Clion lists old/outdated targets when targets are added or removed.

If you’re still seeing the problem, please try to reproduce the issue in a clean, minimal project.

Here, when I copy the AudioPlugin CMake example to a new location, uncomment the add_subdirectory line to include JUCE, and then build the project, the lv2 helper is not built, and the target does not seem to be added:

C:\Users\reuk\development\AudioPlugin> cmake --build .\cmake-build\ --target juce_lv2_helper
MSBuild version 17.3.1+2badb37d1 for .NET Framework
MSBUILD : error MSB1009: Project file does not exist.
Switch: juce_lv2_helper.vcxproj

Yes, sorry about that, there was something screwed up with my project. All looks good now, thank you!

I used the JUCE version from the fix and deleted my build directory to start a new build but I’m still having issues using CPack:

cmake-build-debug-macos % cpack
CPack: Create package using ZIP
CPack: Install projects
CPack: - Install project: MyKVR_APP []
CMake Error at /Users/kamil/alces/mykvr/cmake-build-debug-macos/_deps/juce-build/modules/juce_audio_plugin_client/cmake_install.cmake:41 (file):
  file INSTALL cannot find
  No such file or directory.
Call Stack (most recent call first):
  /Users/kamil/alces/mykvr/cmake-build-debug-macos/_deps/juce-build/modules/cmake_install.cmake:122 (include)
  /Users/kamil/alces/mykvr/cmake-build-debug-macos/_deps/juce-build/cmake_install.cmake:42 (include)
  /Users/kamil/alces/mykvr/cmake-build-debug-macos/cmake_install.cmake:42 (include)

CPack Error: Error when generating package: MyProj

Are you absolutely sure you deleted the build directory? When I build from a clean directory here, I don’t get any modules/juce_audio_plugin_client/cmake_install.cmake generated in the build tree.

It’s working now. I was previously using commit c920eb95fd94839a1b34bd0797e2ba5f85aed331 but switchd to 886ee724de1a34f984548f9f1a5c2198fd4c9751 just now and was able to cpack without issue. Thanks!