Notes |
|
(0009587)
|
Miguel Figueroa
|
2007-10-28 15:55
|
|
I have raised the priority level on this, because I'm depending on this in two patches (for FindwxWidgets and FindImageMagick).
This issue was initially discussed here: http://www.cmake.org/pipermail/cmake/2007-October/017076.html [^]
Alex Neundorf agrees that the patch is reasonable, but we would like input from other CMake developers. I can apply the patch and support/maintain any arising issues, but I don't want to abuse my cvs write access. Hence, if this bug is assigned to me I'll apply the patch, otherwise I'll expect someone else to decide on it.
--Miguel
|
|
|
(0009972)
|
Miguel Figueroa
|
2007-12-18 08:20
|
|
I've attached another patch that includes the change from a MACRO to a FUNCTION. This is to be used by many find modules and we are only interested in setting XXX_FOUND and the success/failure messages. Hence, all the local variables should be in fact local.
--Miguel |
|
|
(0010405)
|
Alex Neundorf
|
2008-02-06 17:04
|
|
I committed the part which changes the macro to a function.
About the other change: this means FOO_FOUND is only set to TRUE if all components have been found, right ?
Is this the expected behaviour ?
I'm not sure. Does Modules/readme.txt say something about this ?
Alex |
|
|
(0018521)
|
Alex Neundorf
|
2009-11-22 10:55
|
|
Uploaded updated version of the patch.
Currently I feel a bit unsure about this patch, because it changes the behaviour of an existing macro. With this change, find_package_handle_standard_args() can now return FALSE where it returned TRUE before.
Alex |
|
|
(0018880)
|
Alex Neundorf
|
2009-12-14 17:05
|
|
Not sure this is necessary.
You could also do a nested approach for that e.g. in a FindBlub.cmake:
set(BLUB_REQUIRED_COMPONENTS_RESULTS)
if( Blub_FIND_COMPONENTS )
foreach( _component ${Blub_FIND_COMPONENTS} )
set(BLUB_REQUIRED_COMPONENTS_RESULTS ${BLUB_REQUIRED_COMPONENTS_RESULTS}
BLUB_${_component}_FOUND)
endforeach( _component )
endif( BLUB_FIND_COMPONENTS )
find_package_handle_standard_args(Blub_Foo DEFAULT_MSG FOO_LIBRARY)
find_package_handle_standard_args(Blub_Bar DEFAULT_MSG BAR_LIBRARY)
find_package_handle_standard_args(Blub DEFAULT_MSG BLUB_LIBRARY
${BLUB_REQUIRED_COMPONENTS_RESULTS})
Dealing with the Blub_FIND_COMPONENTS could still be made easier with some macro I think.
Alex |
|
|
(0024905)
|
jzarl
|
2011-01-19 06:49
|
|
I have uploaded a patch that allows to specify component-specific variables using the following syntax:
find_package_handle_standard_args (NAME [REQUIRED_VARS <var1>...<varN>]
[COMPONENTS
[COMPONENT <cname> <cvar1>..<cvarN> [COMPONENT <cname> <cvar1>..<cvarN>[..]]]
[[NO_]CHECK_REQUESTED_COMPONENTS]
]
[VERSION_VAR <versionvar>
[CONFIG_MODE]
[FAIL_MESSAGE "Custom failure message"] )
For the above example by Alex, the syntax would look like this:
find_package_handle_standard_args(Blub REQUIRED_VARS BLUB_LIBRARY COMPONENTS COMPONENT Foo FOO_LIBRARY COMPONENT Bar BAR_LIBRARY)
The original post on the mailing list is here: http://www.cmake.org/pipermail/cmake/2010-December/041361.html [^]
Johannes
|
|
|
(0030167)
|
Alex Neundorf
|
2012-08-03 16:16
|
|
Since 2.8.8 find_package_handle_standard_args() (and find_package() itself) have improved support for components, so I'm closing this one.
You can now say
find_package_handle_standard_args(... HANDLE_COMPONENTS ...)
and it will take care of them, see the documentation for details. |
|