|
From: <sm...@us...> - 2009-01-19 09:20:04
|
Revision: 9342
http://plplot.svn.sourceforge.net/plplot/?rev=9342&view=rev
Author: smekal
Date: 2009-01-19 09:19:53 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
CMake build system changes to locate the Lua libraries (5.0) needed for the Lua bindings. The Lua bindings are disabled by default.
Modified Paths:
--------------
trunk/cmake/modules/plplot.cmake
trunk/cmake/modules/summary.cmake
Added Paths:
-----------
trunk/cmake/modules/lua.cmake
Added: trunk/cmake/modules/lua.cmake
===================================================================
--- trunk/cmake/modules/lua.cmake (rev 0)
+++ trunk/cmake/modules/lua.cmake 2009-01-19 09:19:53 UTC (rev 9342)
@@ -0,0 +1,53 @@
+# cmake/modules/lua.cmake
+#
+# LUA binding configuration
+#
+# Copyright (C) 2008 Werner Smekal
+#
+# This file is part of PLplot.
+#
+# PLplot is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; version 2 of the License.
+#
+# PLplot is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with the file PLplot; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# Module for determining LUA bindings configuration options
+
+# Options to enable LUA bindings
+if(DEFAULT_NO_BINDINGS)
+ option(ENABLE_lua "Enable LUA bindings" OFF)
+else(DEFAULT_NO_BINDINGS)
+ option(ENABLE_lua "Enable LUA bindings" OFF)
+endif(DEFAULT_NO_BINDINGS)
+
+if(ENABLE_lua AND NOT BUILD_SHARED_LIBS)
+ message(STATUS "WARNING: "
+ "Lua requires shared libraries. Disabling lua bindings")
+ set(ENABLE_lua OFF CACHE BOOL "Enable LUA bindings" FORCE)
+endif(ENABLE_lua AND NOT BUILD_SHARED_LIBS)
+
+if(ENABLE_lua AND NOT SWIG_FOUND)
+ message(STATUS "WARNING: "
+ "swig not found. Disabling LUA bindings")
+ set(ENABLE_lua OFF CACHE BOOL "Enable LUA bindings" FORCE)
+endif(ENABLE_lua AND NOT SWIG_FOUND)
+
+if(ENABLE_lua)
+ # Check for Lua libraries which defines
+ # LUA_LIBRARIES = path to the lua library
+ # LUA_INCLUDE_DIR = path to where lua.h is found
+ find_package(Lua50)
+ if(NOT LUA50_FOUND)
+ message(STATUS "WARNING: "
+ "lua library and/or header not found. Disabling lua bindings")
+ set(ENABLE_lua OFF CACHE BOOL "Enable LUA bindings" FORCE)
+ endif(NOT LUA50_FOUND)
+endif(ENABLE_lua)
Property changes on: trunk/cmake/modules/lua.cmake
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:eol-style
+ native
Modified: trunk/cmake/modules/plplot.cmake
===================================================================
--- trunk/cmake/modules/plplot.cmake 2009-01-19 09:14:48 UTC (rev 9341)
+++ trunk/cmake/modules/plplot.cmake 2009-01-19 09:19:53 UTC (rev 9342)
@@ -311,6 +311,7 @@
include(pdl)
include(ada)
include(ocaml)
+include(lua)
# =======================================================================
# additional library support
Modified: trunk/cmake/modules/summary.cmake
===================================================================
--- trunk/cmake/modules/summary.cmake 2009-01-19 09:14:48 UTC (rev 9341)
+++ trunk/cmake/modules/summary.cmake 2009-01-19 09:19:53 UTC (rev 9342)
@@ -117,7 +117,7 @@
ENABLE_pdl: ${ENABLE_pdl} ENABLE_wxwidgets: ${ENABLE_wxwidgets}
ENABLE_gnome2: ${ENABLE_gnome2} ENABLE_pygcw: ${ENABLE_pygcw}
ENABLE_ada: ${ENABLE_ada} ENABLE_d: ${ENABLE_d}
-ENABLE_ocaml: ${ENABLE_ocaml}
+ENABLE_ocaml: ${ENABLE_ocaml} ENABLE_lua: ${ENABLE_lua}
")
message("${_output_results}")
endmacro(summary)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|