[CMake] How to use FindPackageHandleStandardArgs

Denis Scherbakov denis_scherbakov at yahoo.com
Thu May 14 05:07:37 EDT 2009



> 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 omitted without any harm - it should not appear FIND_PACKAGE_HANDLE_STANDARD_ARGS.

Example:

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSL DEFAULT_MSG GSL_LIBRARY
GSL_CBLAS_LIBRARY GSL_INCLUDE_DIR)

MARK_AS_ADVANCED(GSL_INCLUDE_DIR GSL_LIBRARY GSL_CBLAS_LIBRARY
GSL_CXX_FLAGS GSL_LINK_DIRECTORIES GSL_CONFIG_EXECUTABLE)


      


More information about the CMake mailing list