[CMake] Confusion regarding usage of find_package and PATHS or HINTS

jmerkow jmerkow at gmail.com
Tue Jun 10 13:48:29 EDT 2014


Basically, the scenario I'm using this is when libraries are in some unknown
location, but the location can be set during the configure step. 
In our case we have a number of external libraries that aren't  (and
shouldn't be) installed, so there not going to be in any of the standard
locations (I.e they won't be in /usr/bin etc).  We provide precompiled
versions of these libraries for convenience, or the user can compile them.
In the case where they use our precompiled libs, we have a standard
directory structure for the externals.  I.e,
externals/bin/lib-name/sub-dir-structure/. The externals directory can be
anywhere, and we provide FindXxx.cmake files to locate them (given the
location of the external dir).  So, with this, as long as the external dir
location is known (and the follow the structure), we can find the libraries
easily. We do it this way so the FindXxx.cmake files can be edited easily if
we want to update them, or use fallback locations for some of the libraries. 





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


More information about the CMake mailing list