[latexila] New CMake option: VALAC
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] New CMake option: VALAC
- Date: Mon, 19 Sep 2011 12:48:29 +0000 (UTC)
commit e929ac5e96b6b26c02ca423af86369951e0bea7e
Author: SÃbastien Wilmet <swilmet src gnome org>
Date: Mon Sep 19 14:38:36 2011 +0200
New CMake option: VALAC
CMakeLists.txt | 18 ++++++++++++------
INSTALL | 14 ++++++++++++++
2 files changed, 26 insertions(+), 6 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d780841..3742671 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,7 @@ set (BUILD_VALA ON CACHE BOOL "Generate the C code from Vala files")
set (WITH_GNOME OFF CACHE BOOL
"Use gsettings-desktop-schemas for a better integration with GNOME")
set (COMPILE_SCHEMA ON CACHE BOOL "Compile the GSettings schema")
+set (VALAC "" CACHE FILEPATH "The valac executable to use")
# Native Language Support
set (GETTEXT_PACKAGE "latexila")
@@ -31,12 +32,17 @@ if (BUILD_VALA)
set (_vala_main_version "0.12")
set (_vala_min_version "0.12.1")
- find_vala (${_vala_main_version})
-
- if ((NOT VALA_FOUND) OR
- ("${VALA_VERSION}" VERSION_LESS "${_vala_min_version}"))
- message (FATAL_ERROR
- "Vala ${_vala_main_version}.x >= ${_vala_min_version} required")
+ if (VALAC)
+ message (STATUS "Use custom valac: ${VALAC}")
+ set (VALA_EXECUTABLE ${VALAC})
+ else ()
+ find_vala (${_vala_main_version})
+
+ if ((NOT VALA_FOUND) OR
+ ("${VALA_VERSION}" VERSION_LESS "${_vala_min_version}"))
+ message (FATAL_ERROR
+ "Vala ${_vala_main_version}.x >= ${_vala_min_version} required")
+ endif ()
endif ()
endif ()
diff --git a/INSTALL b/INSTALL
index c94498e..a800871 100644
--- a/INSTALL
+++ b/INSTALL
@@ -81,3 +81,17 @@ Configuration
-DCOMPILE_SCHEMA=OFF
Useful for packages.
+
+
+* Set a custom Vala compiler
+
+ By default, the right "valac-X.Y" is searched in the directories listed
+ by the PATH environment variable. If Vala 0.12 is required for example,
+ CMake search the binary "valac-0.12".
+
+ But if you want to use another valac binary located in a strange
+ directory, you can run cmake with:
+ -DVALAC=/path/to/your/valac
+
+ Pay attention that if you use this option, there is no check to see if
+ you specify the right version of Vala.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]