Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-18 Thread Marcel Loose
et To: cmake@cmake.org Cc: Marcel Loose Subject: Re: [CMake] How to use FindPackageHandleStandardArgs Date: Sat, 16 May 2009 17:33:58 +0200 On Friday 15 May 2009, Marcel Loose wrote: > Hi all, > > On second thought, I think the interface of > find_package_handle_standard_args()

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-16 Thread Alexander Neundorf
On Friday 15 May 2009, Marcel Loose wrote: > Hi all, > > On second thought, I think the interface of > find_package_handle_standard_args() is a bit counter-intuitive. Why > should it matter to the (ignorant) user that list-variables are treated > different from "ordinary" values. That doesn't make

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-15 Thread Marcel Loose
Hi all, On second thought, I think the interface of find_package_handle_standard_args() is a bit counter-intuitive. Why should it matter to the (ignorant) user that list-variables are treated different from "ordinary" values. That doesn't make sense IMHO. I've taken the time to rewrite find_packa

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Marcel Loose
Ok, thanks Denis. Marcel. On Thu, 2009-05-14 at 05:29 -0700, Denis Scherbakov wrote: > > What's the best way to proceed. Should I collect the names > > of variables > > used in the find_library() calls in a separate list > > variable and use > > that for find_package_handle_standard_args(), or sh

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Denis Scherbakov
> What's the best way to proceed. Should I collect the names > of variables > used in the find_library() calls in a separate list > variable and use > that for find_package_handle_standard_args(), or should I > just handle > the REQUIRED and QUIET stuff myself in this case. Any > recommendations?

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Marcel Loose
Hi Denis, I think I understand what's going wrong. I collect the *values* from the variables returned by find_library() in XXX_LIBRARIES, not the names of these variables. So, instead of passing LIB1 LIB2 LIB3 to find_package_handle_standard_args() I'm actually passing ${LIB1} ${LIB2} ${LIB3}, wh

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Denis Scherbakov
> Yes, that's right. But... > > The number of libraries I need to find depends on the > COMPONENTS that > were specified by the user in his CMakeLists.txt file. So I > cannot hard > code these variables as arguments to > find_package_handle_standard_args(). That's why I chose to > collect them >

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Marcel Loose
Yes, that's right. But... The number of libraries I need to find depends on the COMPONENTS that were specified by the user in his CMakeLists.txt file. So I cannot hard code these variables as arguments to find_package_handle_standard_args(). That's why I chose to collect them in XXX-LIBRARIES firs

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Denis Scherbakov
> That's my case as well. I need to find more than one > library, and it's > an all or nothing situation. I mean, if any of the > libraries I'm > searching for is missing, the package as such cannot be > used. So, my > original question still stands: > How should I pass a list of libraries to >

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Marcel Loose
Hi Denis, That's my case as well. I need to find more than one library, and it's an all or nothing situation. I mean, if any of the libraries I'm searching for is missing, the package as such cannot be used. So, my original question still stands: How should I pass a list of libraries to find_pack

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Denis Scherbakov
> I stumbled on a problem with FindPackageHandleStandardArgs, > which > probably arises from my misunderstanding of how to properly > use it. In FIND_PACKAGE_HANDLE_STANDARD_ARGS I inlude only variables that must always be defined in order for a package to function. If some variable can be omit

[CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Marcel Loose
Hi all, I stumbled on a problem with FindPackageHandleStandardArgs, which probably arises from my misunderstanding of how to properly use it. The case is the following. I check for the presence of a number of libraries, using find_library(). I collect the values, returned by find_library() in a X