TopoToolbox / libtopotoolbox

A C library for the analysis of digital elevation models.
https://topotoolbox.github.io/libtopotoolbox/
GNU General Public License v3.0
0 stars 3 forks source link

Create install targets only if TT_INSTALL is set #50

Closed wkearn closed 2 weeks ago

wkearn commented 2 weeks ago

This is a breaking change to the build and installation process -- anything that depended on the CMake install targets being unconditionally created will not function properly. I do not believe that anything does actually depend on this at the moment, however.

Because the libtopotoolbox project unconditionally creates the install targets, everything gets installed whenever a dependency (i.e. pytopotoolbox) installs something. This is not always necessary, for example when the dependency links libtopotoolbox statically -- as pytopotoolbox does currently. The TT_INSTALL boolean flag should be set during the build configuration

cmake -B build -DTT_INSTALL=TRUE -DTT_BUILD_TESTS=TRUE -DTT_BUILD_DOCS=TRUE