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.
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.
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?
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?
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
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!
I have updated to the latest JUCE 7.0.3, I can verify this works on macOS, but the lv2 helper still appears in the CMake target list in CLion on Windows. @reuk can you take a look at this and fix it?
Update:
The LV2 helper suddenly disappeared. I suspect there must have been some kind of caching issue.