[cmake-developers] FindSTLSoft.cmake, Problems?

Brad King brad.king at kitware.com
Fri Jan 8 11:30:50 EST 2016


On 12/28/2015 07:31 AM, mikkoi wrote:
> A CMake project depends on the header only library STLSoft
> (http://www.stlsoft.org/).
> We rely on the developer having STLSoft installed or "installed"
> (pointed to by an environment variable) on his system for compilation.

Ideally packages should provide CMake packaging files as documented here:

 https://cmake.org/cmake/help/v3.4/manual/cmake-packages.7.html

However, since header-only libraries tend to have no build system this
may be a tough sell upstream.  Find modules are the fallback approach.

> To make sure the developer's version is high enough, I created this
> FindSTLSoft.cmake file.
> 
> Can someone read it through, and say if there are any errors or
> antipatterns.
> I'm still learning CMake, so I might have made mistakes.

Please read through the cmake-developer(7) manual section on modules
and find modules:

 https://cmake.org/cmake/help/v3.4/manual/cmake-developer.7.html#modules

-Brad



More information about the cmake-developers mailing list