CMake Error at JUCE/extras/Build/CMake/JUCEUtils.cmake:470 (message):
Target AudioEngine does not have a generated sources directory. Ensure
it was created with a juce_add_* function
Call Stack (most recent call first):
CMakeLists.txt:112 (juce_generate_juce_header)
I’ve tried removing the source_group stuff based on some comments I read in the API, but still no joy. The full CMakeLists.txt is pretty long, but I can prepare a barebones example if it’s not immediately clear what the problem is
You can only generate a juce header for a target added with one of the juce_add_ functions. It sounds like you’re trying to add a juce header for the library target, but that is not currently supported.
You can just include the JUCE module headers directly, instead of using a JUCE header file.
Using JUCE from a library is maybe not recommended - JUCE doesn’t have a stable ABI, so you probably shouldn’t expose any JUCE types/functions from your library, unless you’re prepared to rebuild everything that depends on your library every time the library/JUCE changes.
Just a follow up on this to say I have been able to get my library building and working fine. Just one issue though. If I include the library code as part of a test app, I get no leaks on exit. But as soon as I load and unload the static libs I get hit with an abundance of the the following(see below). And that’s only a short selection of the leaks.
Is there anything I should be watching out for in particular here? Tips or advice on how to avoid such leaks would be most welcome.
***** Leaked objects detected: 9 instance(s) of class RenderingOp**
**JUCE Assertion failure in juce_LeakedObjectDetector.h:92**
***** Leaked objects detected: 9 instance(s) of class RenderingOp**
**JUCE Assertion failure in juce_LeakedObjectDetector.h:92**
***** Leaked objects detected: 1 instance(s) of class OwnedArray**
**JUCE Assertion failure in juce_LeakedObjectDetector.h:92**
***** Leaked objects detected: 1 instance(s) of class OwnedArray**
**JUCE Assertion failure in juce_LeakedObjectDetector.h:92**
***** Leaked objects detected: 2 instance(s) of class AudioBuffer**
**JUCE Assertion failure in juce_LeakedObjectDetector.h:92**
***** Leaked objects detected: 4 instance(s) of class MidiBuffer**
**JUCE Assertion failure in juce_LeakedObjectDetector.h:92**
etc....
Yet another message to myself So it’s all good now. The library destructor wasn’t being called if I simply closed the host. Armed with that knowledge it was pretty simply to fix those leaks.