~writer-devs/writer/trunk

« back to all changes in this revision

Viewing changes to cmake/FindValadoc.cmake

  • Committer: harp37 at gmail
  • Date: 2014-11-25 00:55:20 UTC
  • mto: This revision was merged to the branch mainline in revision 70.
  • Revision ID: harp37@gmail.com-20141125005520-6ax4j204vr1bby2i
CMake is nearly there.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
# Search for the valadocc executable in the usual system paths.
 
3
find_program(VALADOC_EXECUTABLE NAMES valadoc)
 
4
 
 
5
# Handle the QUIETLY and REQUIRED arguments, which may be given to the find call.
 
6
# Furthermore set VALA_FOUND to TRUE if Vala has been found (aka.
 
7
# VALA_EXECUTABLE is set)
 
8
 
 
9
include(FindPackageHandleStandardArgs)
 
10
find_package_handle_standard_args(Valadoc DEFAULT_MSG VALADOC_EXECUTABLE)
 
11
 
 
12
mark_as_advanced(VALADOC_EXECUTABLE)
 
13
 
 
14
# Determine the valac version
 
15
if(VALA_FOUND)
 
16
    execute_process(COMMAND ${VALA_EXECUTABLE} "--version" 
 
17
                    OUTPUT_VARIABLE "VALA_VERSION")
 
18
    string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION})
 
19
    string(STRIP ${VALA_VERSION} "VALA_VERSION")
 
20
endif(VALA_FOUND)