We’re in the process of setting up tests using Catch2 for a CMake based plugin project.
We’ve run into an issue with the
JuceHeader include. Since it is associated with the main project target, it is not made available to our ‘Test’ target.
juce_generate_juce_header(Test) throws a CMake error:
CMake Error at cmake-build-debug/_deps/juce-src/extras/Build/CMake/JUCEUtils.cmake:877 (message): Target Test does not have a generated sources directory. Ensure it was created with a juce_add_* function
The current two workarounds are either, directly include the module headers needed from JUCE, or add the include directory to the Test target e.g.
Is there a way to give access to
JuceHeader.h from another target?