3 ms·
I just wrote a bash script collection built on cmake that allows me to build and deploy libraries and modules for easy use in any project I want, without having
by hellofunk 9y ago
I just wrote a bash script collection built on cmake that allows me to build and deploy libraries and modules for easy use in any project I want, without having to worry about all the include paths, linking, etc. I just add the name of the module to a Cmake variable and the scripts do the rest, making sure everything is found and included. Even third parties work nicely this way since I can just build them using my cmake scripts and have them automatically exported as modules for other projects to use.
Setting this up was a couple weeks of learning curve but I agree it is worth it to invest in Cmake and also learn the low-level details about how it all fits together since after all we are dealing with a native low-level language, it also pays to see under the hood of these "package managers" and build systems so you can be fluid on any platform where you need to build.
- geokon 9y agoYou can actually do this from within CMake itself with a bit of a hack Here is someone who did something similar: https://crascit.com/2015/07/25/cmake-gtest/ https://crascit.com/2015/07/25/cmake-gtest/ If you're interested I can upload my version a bit later
- pfultz2 9y agoThis sound similar to cmake-get: https://github.com/pfultz2/cmake-get https://github.com/pfultz2/cmake-get