geary/cmake/FindValadoc.cmake
Jim Nelson 15ed404279 Produce Valadoc for the Engine: Closes #4346
"make valadoc" will now produce valadoc/ in the top-level directory.
Still a lot of work to do to clean this up, as some names need to be
fixed for better heirarchy and others should be made private to prevent
leakage.  And, of course, more classes, namespaces, and methods need
to be properly documented.
2013-04-25 20:03:42 -07:00

20 lines
725 B
CMake

# Search for the valadocc executable in the usual system paths.
find_program(VALADOC_EXECUTABLE NAMES valadoc)
# Handle the QUIETLY and REQUIRED arguments, which may be given to the find call.
# Furthermore set VALA_FOUND to TRUE if Vala has been found (aka.
# VALA_EXECUTABLE is set)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Valadoc DEFAULT_MSG VALADOC_EXECUTABLE)
mark_as_advanced(VALADOC_EXECUTABLE)
# Determine the valac version
if(VALA_FOUND)
execute_process(COMMAND ${VALA_EXECUTABLE} "--version"
OUTPUT_VARIABLE "VALA_VERSION")
string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION})
string(STRIP ${VALA_VERSION} "VALA_VERSION")
endif(VALA_FOUND)