1
# Copyright (C) 2013 Christian Dywan <christian@twotoasts.de>
3
find_program(VALA_EXECUTABLE NAMES valac)
5
execute_process(COMMAND ${VALA_EXECUTABLE} "--version" OUTPUT_VARIABLE "VALA_VERSION")
6
string(REPLACE "Vala " "" VALA_VERSION ${VALA_VERSION})
7
string(STRIP ${VALA_VERSION} VALA_VERSION)
9
message(FATAL_ERROR "valac not found")
12
macro(vala_require VALA_REQUIRED)
13
if (${VALA_VERSION} VERSION_GREATER ${VALA_REQUIRED} OR ${VALA_VERSION} VERSION_EQUAL ${VALA_REQUIRED})
14
message(STATUS "valac ${VALA_VERSION} found")
16
message(FATAL_ERROR "valac >= ${VALA_REQUIRED} or later required")
18
endmacro(vala_require)