FindDoxygen: cannot use binaries in custom directory
Hello, dear cmake team.
In our windows build environment, we use doxygen not as installation but as binaries in custom relative folder. And it looks like it's impossible to make FindDoxygen for us - "_Doxygen_find_doxygen" macro start to work at the moment of include and looks for predefined folders and registry. And currently there is no way to make this find doxygen binaries.
Currently obviously the following usages are not working because it doesn't affect on "_Doxygen_find_doxygen" macro:
find_package(doxygen PATHS ${DOXYGEN_BINARIES_PATH} )
find_package(doxygen HINTS ${DOXYGEN_BINARIES_PATH} )
find_package(doxygen PATHS ${DOXYGEN_BINARIES_PATH} HINTS ${DOXYGEN_BINARIES_PATH} )
And I cannot include path to doxygen into ENV VAR PATH because it is relative and on different build systems it will be different.
Please consider to improve modules/FindDoxygen.cmake to make it possible specify the path for doxygen
As proposal example:
macro(_Doxygen_find_doxygen)
find_program(
DOXYGEN_EXECUTABLE
NAMES doxygen
PATHS
** ${DOXYGEN_BINARIES_PATH}**
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\doxygen_is1;Inno Setup: App Path]/bin"
/Applications/Doxygen.app/Contents/Resources
/Applications/Doxygen.app/Contents/MacOS
/Applications/Utilities/Doxygen.app/Contents/Resources
/Applications/Utilities/Doxygen.app/Contents/MacOS
DOC "Doxygen documentation generation tool (https://www.doxygen.nl)"
VALIDATOR _Doxygen_version_validator
)
mark_as_advanced(DOXYGEN_EXECUTABLE)
And usage:
set(DOXYGEN_BINARIES_PATH ${MY_TOOLS}/binaries/doxygen )
find_package(doxygen)
Thank you in advance