Conversation
|
Hi, I tried testing this with the ffs, however I encountered an error at the CMake Generate step: Reading around, it seems that a solution is to always export nlohmann_json like: which then builds successfully for me. However it's not clear to me why the same issue wouldn't arise with fmt where you use a similar pattern (I guess it's down to differences in how the installs are defined in their respective CMake files). Further reading around suggests it might be cleaner to use find_package here rather than FetchContent, which would change nlohmann_json from an optional to required dependency - but we are heavily tied into this so that doesn't sound like an issue to me. But I haven't tried this so perhaps it brings other issues. |
faf8328 to
1fc2376
Compare
jbeilstenedmands
left a comment
There was a problem hiding this comment.
Thanks, I can confirm this now work as expected for me.
Previously, the installation and export sections in CMakeLists.txt were
commented out to streamline development. This worked well for rapid
iteration but prevented proper library installation, which is now
required for building Docker containers with cleanly separated build and
runtime environments.
This PR re-enables and extends the installation system to support both
submodule usage and standalone installation, while dynamically handling
dependencies to avoid duplication and export conflicts.
config files.
find_package(DX2)indownstream projects.
Conditionally install FetchContent dependencies (nlohmann_json, fmt)only when they were fetched rather than found via system packages,
preventing duplicate installations and export conflicts.
STREQUALfix for proper CMake path comparison in root detection.These changes enable proper Docker container builds with managed
dependencies while maintaining full compatibility with existing
submodule usage patterns and adding find_package support for projects
that prefer system-managed installations.