[CMake] How to handle COMPONENT arguments to find_package in my Config file?
Stephen Kelly
steveire at gmail.com
Wed Jun 22 12:01:37 EDT 2011
Hi,
In my GrantleeConfigVersion.cmake.in I can use ${PACKAGE_FIND_VERSION} which
I presume is filled from the find_package command (I just copied the file
from elsewhere).
Is there an equivalent for COMPONENTS so that if someone does a
find_package(Grantlee COMPONENTS Foo Bar)
my config file would do something like:
if (${PACKAGE_FIND_COMPONENTS} CONTAINS "Foo")
# Find the dependencies of Foo
endif()
if (${PACKAGE_FIND_COMPONENTS} CONTAINS "Bar")
# Find the dependencies of Bar
endif()
Thanks,
Steve.
More information about the CMake
mailing list