Thanks for the reply Cliff.
I was unaware of Zulip or the BRL-CAD channel there -- I may have to check that out.
I'm thrilled to see some maintenance of SC -- and it looks like you've been going after some of my annoyances. I look forward to some sort of a release when your and Chris' work is done.
Glad to hear the SCTestBuild might be useful -- I just grabbed what we do in OpenVSP and stripped it down as far as it would go.
A long time ago, I contributed the AP203Min example to SC -- including an odd build system that embedded an ExternalProject_add build of the entire SC library within...
It is probably worth my time to update my SCTestBuild to actually build the AP203Min example and run a test that compares the result to a reference file... I'll see if I can do that.
We've discussed approaches to bundling dependencies in the past. Your approaches have always been more sophisticated than mine -- if you have time at some point to write a blog post about the design and philosophy of what you're trying to do, I'm certain I would learn from it.
For OpenVSP, we have a few goals...
On MacOS and Windows, package all the dependencies with OpenVSP, try to use the project's native build system, try to link statically.
On Linux, try to lean on the system's packaging system for all dependencies, use dynamic linking for those. For anything where that doesn't work, or a user is on a system where they can't get a library installed, fall back to our bundled version and static linking.
While STEPCode is set up like this in OpenVSP, so far I haven't had any expectation that it would ever be a system installed library managed by a distribution. So, we always use the bundled version. So long as it works with a FindSTEPCode.cmake script, if that status ever changes, OpenVSP will be fine with it.
We want the CMake on the application side to not care whether it was a bundled library or installed to a standard location with a packaging system. So, we try to use CMake's Find_Package( Blah ) system -- setting a 'hint' variable just before that will lead it to find the bundled version if we're going that way.
We follow the 'SuperProject' pattern -- this lets us have the Libraries in one project and the App in another -- as well as a SuperProject that bundles both together.
Someone who just wants to build OpenVSP for a particular system can use the SuperProject - one stop shop. A developer is more likely to build the Libraries separately from the app -- that way, they don't have to constantly re-build the Libraries as they work on the app.
If I find myself needing to develop on a Library while working on OpenVSP, I can tell the build system to use a 'System Installed' version of the library -- and then set the hint variable to point at my development version of the lib. That way, I can hack on the library, build there (if it isn't header-only) and then re-build OpenVSP and everything works - with just that one library pulled from my 'live' dev version.
I have to admit, I've gotten this far in life not knowing that RPATH was a thing or that I might want to manage it...
Most of our CMake techniques for this stuff are vintage 2013. I'm generally getting to the point where I need to do an overhaul and cleanup to 'Modern CMake' (while still supporting RHEL 7 users).
Rob