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

2014-06-19 Thread Jean-Christophe Fillion-Robin
Hi Jameson, If your are superbuild-ing the associated project, you can simply configure the project depending on these library by explicitly setting the expected variable. That will be deterministic and you won't rely on a search and find behavior. Hth Jc On Tue, Jun 10, 2014 at 2:28 PM,

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

2014-06-19 Thread jmerkow
Jc, That is precisely what I do for superbuild. This applies to non superbuilds, its also helpful if we are running on a cluster, supercomputers or machines that it is difficult to access the web (though superbuild URLs can be local paths too). Its also helpful for people running multiple

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

2014-06-10 Thread jmerkow
Is there a generally accepted method to pass extra paths to find_package in module mode? To get around this, I have been doing something like this: set(FOO_EXTRA_PATHS path1 path2) Find_package(FOO) In FindFOO.cmake: ... set(FOO_LIB_POSSIBLE_PATHS ${FOO_EXTRA_PATHS} /path3/) ... (Use the

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

2014-06-10 Thread James Bigler
That work around seems to only be useful if you wish to modify all the find modules you wish to use. Is there a CMake variable you could set that would allow all the find_{include,library,path} functions within modules to pick up the HINT'ed path first then search the system paths? On Tue, Jun

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

2014-06-10 Thread Nils Gladitz
On 10.06.2014 19:09, jmerkow wrote: Is there a generally accepted method to pass extra paths to find_package in module mode? To get around this, I have been doing something like this: set(FOO_EXTRA_PATHS path1 path2) Find_package(FOO) In FindFOO.cmake: ... set(FOO_LIB_POSSIBLE_PATHS

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

2014-06-10 Thread jmerkow
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

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

2014-06-10 Thread jmerkow
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

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

2014-06-09 Thread R. Keith Morley
Hello, I am having trouble using find_package along with PATHS or HINTS. If I include a PATHS or HINTS path which does not contain the searched-for package, I always get an error such as this: CMake Error at CMakeLists.txt:182 (find_package): Could not find module FindGLEW.cmake or a

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

2014-06-09 Thread Nils Gladitz
On 09.06.2014 22:31, R. Keith Morley wrote: Hello, I am having trouble using find_package along with PATHS or HINTS. If I include a PATHS or HINTS path which does not contain the searched-for package, I always get an error such as this: CMake Error at CMakeLists.txt:182 (find_package):