I'm not the author of the libraries, and none of them are cmake friendly. So
it doesn't make sense to create FOOconfig.cmake files for them. Using the
command line -D  or adding env variables to add new search directories,
seems like an unnecessary headache for the user (our windows users esp
wouldn't enjoy it). Right now, they configure, specify the location of the
externals directory (if it's not in one of the pre-subscribed location) and
the libraries are found.

Some do come with installation packages (commercial libs), but these are
often unused, in favor of placing the libraries in some location. So using
this method allows us to search in the externals directory, search in
default locations, and specify specific locations (full path) to search for
the libraries. I should also mention that many of these libraries have
multiple libs files, not all of which are always needed, and can have
interdependencies between packages. So if I have pacakageA and packageB, I
need different libraries and headers from both packages them if I were to
just have one.  All this logic is obv handled by the main project, and
COMPONENTS arg is used indicate that a particular extra library/header is
needed. 

Essentially, what I'm doing is using the same behavior for finding config
files by adding HINTS/PATHS but looking for libraries instead of
FOOConfig.cmake. 





--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Confusion-regarding-usage-of-find-package-and-PATHS-or-HINTS-tp7587611p7587620.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

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://www.cmake.org/mailman/listinfo/cmake

Reply via email to