Hi all,
I need to parse the stuff passed to findXXX.cmake file. How can it be done?
I’ve tried the cmake_parse_arguments
but ARGV and ARGN are empty.
Usage example:
CMakeLists.txt file:
find_package(foo REQUIRED
COMPONENTS
bar
baz
)
findfoo.cmake file:
# find what components do we need and if it is required
# Parsing code here
if(MY_CONDITION)
do_something()
else ()
do_another_thing(foo_COMPONENTS)
endif()
Thanks.