diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b8f25222..caf80a21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,11 @@ # Requires GObject Introspection development package v0.6.7 or higher # Default=false (do not generate the introspection files) # +# -DICAL_GLIB_VAPI=[true|false] +# Set to build Vala "vapi" files +# Requires Vala package +# Default=false (build the libical-glib interface) +# # -DICAL_GLIB=[true|false] # Set to build libical-glib (GObject) interface # Requires glib development package v2.20 or higher @@ -248,6 +253,23 @@ if(GOBJECT_INTROSPECTION) endif() endif() +option(ICAL_GLIB_VAPI "Build Vala \"vapi\" files.") +if(ICAL_GLIB_VAPI) + if(NOT GOBJECT_INTROSPECTION) + message(FATAL_ERROR "You requested to build the Vapi but have not enabled the GObject Introspection, please retry by passing -DGOBJECT_INTROSPECTION=True to CMake") + endif() + + find_program(VALAC valac) + if(NOT VALAC) + message(FATAL_ERROR "The valac not found. Install it or disable Vala bindings with -DICAL_GLIB_VAPI=False") + endif() + + find_program(VAPIGEN vapigen) + if(NOT VAPIGEN) + message(FATAL_ERROR "The vapigen not found. Install it or disable Vala bindings with -DICAL_GLIB_VAPI=False") + endif() +endif() + set(MIN_GLIB "2.32") set(MIN_LIBXML "2.7.3") option(ICAL_GLIB "Build libical-glib interface. Requires glib ${MIN_GLIB} and libxml ${MIN_LIBXML} development packages or higher." True) |