[CMake] Comments and improvement on find modules
Ghislain Vaillant
ghisvail at gmail.com
Tue Dec 22 13:40:16 EST 2015
Dear CMake users,
I have recently written a set of find modules [1][2][3] for dependencies
I use for the project I am currently working on. I made sure to write
them in a style that is close to what is currently maintained in CMake,
with the goal to submit them for inclusion upstream and benefit the
whole community.
I wanted to ask you guys for comments regarding their content. Some
things may be superfluous, others may be missing or improved. Any piece
of feedback is warmly welcome.
I was also wondering whether there is some sort of best practice with
regards to the handling of user-defined prefixes for custom locations of
dependencies. I saw some modules using ${Pkg}_ROOT, others using
${Pkg}_DIR, some using a cached variable...Could you guys point me to
what is considered good examples here.
[1]
https://github.com/ghisvail/IRTK/blob/enh/cmake-find-modules/CMake/FindFLANN.cmake
[2]
https://github.com/ghisvail/IRTK/blob/enh/cmake-find-modules/CMake/FindLibLBFGS.cmake
[3]
https://github.com/ghisvail/IRTK/blob/enh/cmake-find-modules/CMake/FindNiftiCLib.cmake
Many thanks,
Ghislain
More information about the CMake
mailing list