From d9d9e1f49867f06755943a21a35d979bea438287 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Thu, 1 Oct 2015 22:52:49 +0200
Subject: Compile in Lua support opportunistically
---
CMakeLists.txt | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
(limited to 'CMakeLists.txt')
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})
--
cgit v1.2.3