aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-10-01 22:52:49 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-10-01 22:53:43 +0200
commitd9d9e1f49867f06755943a21a35d979bea438287 (patch)
tree08f1ef68602bbdaf95092392477b857c4e095c5b
parent58b4b2d06da6c0c8da7a21f85f8b8ddafdc70dbd (diff)
downloadponymap-d9d9e1f49867f06755943a21a35d979bea438287.tar.gz
ponymap-d9d9e1f49867f06755943a21a35d979bea438287.tar.xz
ponymap-d9d9e1f49867f06755943a21a35d979bea438287.zip
Compile in Lua support opportunistically
-rw-r--r--.travis.yml2
-rw-r--r--CMakeLists.txt11
-rw-r--r--README.adoc2
3 files changed, 7 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index c539dee..cd4e072 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,6 +28,6 @@ before_script:
- mkdir build
- cd build
script:
- - cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DWITH_LUA=OFF
+ - cmake .. -DCMAKE_INSTALL_PREFIX=/usr
- make
- cpack -G DEB
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 38bc2f1..74b0d74 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,9 +7,6 @@ if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUC)
set (CMAKE_C_FLAGS "-std=c99 -Wall -Wextra -Wno-unused-function")
endif ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUC)
-# Build options
-option (WITH_LUA "Enable experimental support for Lua 5.3 plugins" ON)
-
# Version
set (project_VERSION_MAJOR "0")
set (project_VERSION_MINOR "1")
@@ -43,10 +40,12 @@ else (CURSES_FOUND)
message (SEND_ERROR "Curses not found")
endif (ncursesw_FOUND)
+# FIXME: for "lua" we also need to check that it is < 5.4
+# which doesn't seem to be possible with FindPkgConfig
+pkg_search_module (lua REQUIRED lua5.3 lua-5.3 lua>=5.3)
+option (WITH_LUA "Enable experimental support for Lua 5.3 plugins" ${lua_FOUND})
+
if (WITH_LUA)
- # FIXME: for "lua" we also need to check that it is < 5.4
- # which doesn't seem to be possible with FindPkgConfig
- pkg_search_module (lua REQUIRED lua5.3 lua-5.3 lua>=5.3)
list (APPEND project_libraries ${lua_LIBRARIES})
include_directories (${lua_INCLUDE_DIRS})
link_directories (${lua_LIBRARY_DIRS})
diff --git a/README.adoc b/README.adoc
index 538884a..8b1ee31 100644
--- a/README.adoc
+++ b/README.adoc
@@ -23,7 +23,7 @@ Runtime dependenices: curses, openssl, Jansson, lua = 5.3 (optional)
$ git clone --recursive https://github.com/pjanouch/ponymap.git
$ mkdir ponymap/build
$ cd ponymap/build
- $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -DWITH_LUA=NO
+ $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
$ make
To install the application, you can do either the usual: