find_package_handle_standard_args for target-only modules

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

find_package_handle_standard_args for target-only modules

Mateusz Loskot

When writing a new FindX.cmake module following the spirit of Modern CMake,
that is without setting any X_LIBRARY and X_INCLUDE_DIR variables,
what is the strategy regarding use of find_package_handle_standard_args?

Shall I not use find_package_handle_standard_args at all?
If yes, shall I set X_FOUND and issue any related messages myself?

Shall I use it:
   find_package_handle_standard_args(X DEFAULT_MSG X_LIBRARY X_INCLUDE_DIR)
and follow with
annoying users of FindX.cmake

Shall I simply forget the Modern CMake and set the legacy style variables?

Or something else?

Best regards,
Mateusz Loskot,

Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe:
Mateusz Loskot