On 23/11/16 14:55, Cedric Doucet wrote:

Hello,

I would like to write some FindFoo.cmake files to find packages
installed on different systems including Mac.
I have noticed that homebrew install packages in a repertory whose name
depends on the version of the package.
For example, I have installed a scientific library called scotch, and it
is now installed here:

/usr/local/Cellar/scotch/6.0.4_4

You should never need to use the Cellar directories directly. It should also be linked under /usr/local/opt/scotch *and* linked directly into /usr/local.

When writing a FindFoo.cmake file, you shouldn't need to do anything special to handle this. Just find the headers and libraries as usual.

If it's linked into /usr/local (brew link scotch) then it should be picked up without any special action

If it's not linked into /usr/local then the user should be able to add /usr/local/opt/scotch (or /usr/local/Cellar/scotch/nnnn) to CMAKE_PREFIX_PATH and it should then be picked up, again with no special casing in your FindFoo script


Regards,
Roger
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to