Mathieu Malaterre wrote:
> Just wanted to say : great job on the find_package interface !

Thanks!

> This is extremely convenient to use for package using cmake as build package.
> All I had to do is configure a *Config.cmake and a
> *ConfigVersion.cmake file. And then from the outside I can simply
> find_package(MyPackage HINTS $ENV{MyPackage_ROOT})
> 
> -> No need to write a FindMyPackage.cmake
> -> *Congif.cmake files are auto-magically found
> -> Version is automatically taken into account.
> -> I can easily configure/build, thanks to a simple env var.

FYI, you don't actually need the HINTS option either.
Just set CMAKE_PREFIX_PATH in your environment to point
at the installation prefix (or even the build tree).

You can also set the env var MyPacakage_DIR and it will be used
automatically.  I've just committed documentation and testing
for this old but previously un-advertised feature.

-Brad


Document and test find_package <pkg>_DIR env var
/cvsroot/CMake/CMake/Source/cmFindPackageCommand.cxx,v  <--  
Source/cmFindPackageCommand.cxx
new revision: 1.67; previous revision: 1.66
/cvsroot/CMake/CMake/Tests/FindPackageTest/CMakeLists.txt,v  <--  
Tests/FindPackageTest/CMakeLists.txt
new revision: 1.20; previous revision: 1.19

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to