find_program(CONFIG_EXECUTABLE NAMES my-config PATHS
${CONFIG_EXECUTABLE_PATH} NO_DEFAULT_PATH)
Looks good, should work.
Alternately, must I simply set the path to the program using the
following command?
set(CONFIG_EXECUTABLE, ${CONFIG_EXECUTABLE_PATH}/my-config)
You can do that too.
You can also check via
if(EXISTS ...)
Alex
Thanks, Alex; at least for me, the second option (i.e. using the set
command) appears to be more intuitive, so I will use that particular
option when writing my script. It is interesting to know about the
if(EXISTS ...) option as well.
Nicholas
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake