Hi all,
in _juce_module_sources
, there is a recursive glob, but then the regex filter eliminates all files except for those in the top-level that start with the module name.
Thus, the module INTERFACE library created by CMake only has module_name/module_name_xxx.cpp files as its sources. After we tell CMake to link a concrete library or executable to our module, only the top-level cpp files matching that pattern are built; we’ll get linker errors for any symbols that were defined in other source files. The only way I’ve found to build the rest of the symbols is to #include "path/to/other.cpp"
from within the top-level cpp file(s).
This is the first time I’ve ever had to #include a cpp file and it’s tedious, especially in larger modules. It’s also a bit annoying because anytime one cpp file changes, the entire module has to recompile. (This might be the case anyway with INTERFACE libraries). What’s the benefit to this approach?
What’s the downside to eliminating the manual listing of cpp files and simply doing a recursive glob of all cpp files in the module source tree?
Thanks in advance