Compile in Lua support opportunistically
This commit is contained in:
parent
58b4b2d06d
commit
d9d9e1f498
|
@ -28,6 +28,6 @@ before_script:
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
script:
|
script:
|
||||||
- cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DWITH_LUA=OFF
|
- cmake .. -DCMAKE_INSTALL_PREFIX=/usr
|
||||||
- make
|
- make
|
||||||
- cpack -G DEB
|
- cpack -G DEB
|
||||||
|
|
|
@ -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")
|
set (CMAKE_C_FLAGS "-std=c99 -Wall -Wextra -Wno-unused-function")
|
||||||
endif ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUC)
|
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
|
# Version
|
||||||
set (project_VERSION_MAJOR "0")
|
set (project_VERSION_MAJOR "0")
|
||||||
set (project_VERSION_MINOR "1")
|
set (project_VERSION_MINOR "1")
|
||||||
|
@ -43,10 +40,12 @@ else (CURSES_FOUND)
|
||||||
message (SEND_ERROR "Curses not found")
|
message (SEND_ERROR "Curses not found")
|
||||||
endif (ncursesw_FOUND)
|
endif (ncursesw_FOUND)
|
||||||
|
|
||||||
if (WITH_LUA)
|
|
||||||
# FIXME: for "lua" we also need to check that it is < 5.4
|
# FIXME: for "lua" we also need to check that it is < 5.4
|
||||||
# which doesn't seem to be possible with FindPkgConfig
|
# which doesn't seem to be possible with FindPkgConfig
|
||||||
pkg_search_module (lua REQUIRED lua5.3 lua-5.3 lua>=5.3)
|
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)
|
||||||
list (APPEND project_libraries ${lua_LIBRARIES})
|
list (APPEND project_libraries ${lua_LIBRARIES})
|
||||||
include_directories (${lua_INCLUDE_DIRS})
|
include_directories (${lua_INCLUDE_DIRS})
|
||||||
link_directories (${lua_LIBRARY_DIRS})
|
link_directories (${lua_LIBRARY_DIRS})
|
||||||
|
|
|
@ -23,7 +23,7 @@ Runtime dependenices: curses, openssl, Jansson, lua = 5.3 (optional)
|
||||||
$ git clone --recursive https://github.com/pjanouch/ponymap.git
|
$ git clone --recursive https://github.com/pjanouch/ponymap.git
|
||||||
$ mkdir ponymap/build
|
$ mkdir ponymap/build
|
||||||
$ cd 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
|
$ make
|
||||||
|
|
||||||
To install the application, you can do either the usual:
|
To install the application, you can do either the usual:
|
||||||
|
|
Loading…
Reference in New Issue