[CMake] How to use FindPackageHandleStandardArgs
Denis Scherbakov
denis_scherbakov at yahoo.com
Thu May 14 07:45:17 EDT 2009
> 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 first and pass that variable.
>
> So, I'm still stuck I'm afraid.
You may pass a LIST of variables, this also works.
INCLUDE(FindPackageHandleStandardArgs)
LIST(APPEND myList "GSL_LIBRARIES" "GSL_LIBRARY" "GSL_CBLAS_LIBRARY" "GSL_INCLUDE_DIR")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSL DEFAULT_MSG ${myList})
Denis
More information about the CMake
mailing list