Two simple scripts to install a project that uses CMake (with the patterns I use).
Installing the library that uses CMake:
./install.sh
Cleaning the temporary binaries and cache created by CMake:
./clean.sh
- A
builddirectory is assumed to be created before you use theinstall.shscript. If you wish, you can do so by using theclean.shscript. Alternatively, you can pass your own directory to the script to where it should store temporary CMake files (e.g../install.sh .), but I reccomend using a build directory to keep the root directory clean. - The
install.shscript requires aBUILD_SHARED_LIBSboolean variable within CMake's build system. - Debug and Release builds are built and installed, for both shared and static binaries.
- The
install.shscript does not delete your CMake cache, thus if you wish to have specific settings for your own build, you may do so. To do this, you must leave the CMake cache within thebuilddirectory.
See LICENSE.