MXS-1701: Fix build instructions

Corrected the documentation on building from source and fixed a missing
variable check for the luafilter.
This commit is contained in:
Markus Mäkelä 2018-03-20 14:25:51 +02:00
parent bd8b6dbc6f
commit 65033313a7
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
3 changed files with 15 additions and 13 deletions

View File

@ -42,7 +42,7 @@ sudo apt-get install git build-essential libssl-dev ncurses-dev bison flex \
git clone https://github.com/mariadb-corporation/MaxScale
mkdir build
cd build
cmake ../MaxScale -DCMAKE_INSTALL_PREFIX=/usr
cmake ../MaxScale -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_CDC=N -DBUILD_MAXCTRL=N -DBUILD_LUA=N
make
sudo make install
sudo ./postinst
@ -96,10 +96,10 @@ The next step is to configure MariaDB MaxScale. You only need to execute the fol
command to configure the build.
```
cmake ../MaxScale -DBUILD_TESTS=Y
cmake ../MaxScale -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_CDC=N -DBUILD_MAXCTRL=N -DBUILD_LUA=N
```
This will install MariaDB MaxScale into `/usr/local/` and build the tests. The tests and
This will install MariaDB MaxScale into `/usr/` and build the tests. The tests and
other parts of the installation can be controlled via CMake arguments.
Here is a small table with the names of the most common parameters and what

View File

@ -31,7 +31,7 @@ set(BUILD_MMMON TRUE CACHE BOOL "Build multimaster monitor")
set(BUILD_MAXCTRL TRUE CACHE BOOL "Build MaxCtrl")
# Build Luafilter
set(BUILD_LUAFILTER FALSE CACHE BOOL "Build Luafilter")
set(BUILD_LUAFILTER TRUE CACHE BOOL "Build Luafilter")
# Use gcov build flags
set(GCOV FALSE CACHE BOOL "Use gcov build flags")

View File

@ -1,10 +1,12 @@
find_package(Lua)
if(LUA_FOUND)
include_directories(${LUA_INCLUDE_DIR})
add_library(luafilter SHARED luafilter.c)
set_target_properties(luafilter PROPERTIES VERSION "1.0.0")
target_link_libraries(luafilter maxscale-common ${LUA_LIBRARIES})
install_module(luafilter experimental)
else()
message(STATUS "Lua was not found, luafilter will not be built.")
if (BUILD_LUAFILTER)
find_package(Lua)
if(LUA_FOUND)
include_directories(${LUA_INCLUDE_DIR})
add_library(luafilter SHARED luafilter.c)
set_target_properties(luafilter PROPERTIES VERSION "1.0.0")
target_link_libraries(luafilter maxscale-common ${LUA_LIBRARIES})
install_module(luafilter experimental)
else()
message(STATUS "Lua was not found, luafilter will not be built.")
endif()
endif()