File: FindValadoc.cmake

package info (click to toggle)
terminus 3.6.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,156 kB
  • sloc: xml: 278; javascript: 236; sh: 22; makefile: 21
file content (20 lines) | stat: -rw-r--r-- 725 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

# 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)