3 ms·
in C++ (and by extension C) you can create very robust crosscompileable projects with complex dependencies trees using CMake + Hunter + toolchain files. There
by geokon 5y ago
in C++ (and by extension C) you can create very robust crosscompileable projects with complex dependencies trees using CMake + Hunter + toolchain files.
There is a bit of learning curve but everything is there for a reason.
- Toolchain files define your target system and build toolchain.
- Hunter specifies your dependencies withing CMake (using git and hashes) and does proper incapsulation/namespacing (which isn't present in "normal" CMake) as well as setting up the proper "inheritance" of headers and stuff.
- CMake does the final linking of build artifacts and headers and does the final build command generation.
A proper setup can build both dynamic and static builds for any system with virtually no platform specific switches