diff --git a/Documentation/Getting-Started/Building-MaxScale-from-Source-Code.md b/Documentation/Getting-Started/Building-MaxScale-from-Source-Code.md index 952f98dd0..ce947c970 100644 --- a/Documentation/Getting-Started/Building-MaxScale-from-Source-Code.md +++ b/Documentation/Getting-Started/Building-MaxScale-from-Source-Code.md @@ -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 diff --git a/cmake/defaults.cmake b/cmake/defaults.cmake index 12cdff8a2..548b1674a 100644 --- a/cmake/defaults.cmake +++ b/cmake/defaults.cmake @@ -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") diff --git a/server/modules/filter/luafilter/CMakeLists.txt b/server/modules/filter/luafilter/CMakeLists.txt index bda0c2c53..70993a027 100644 --- a/server/modules/filter/luafilter/CMakeLists.txt +++ b/server/modules/filter/luafilter/CMakeLists.txt @@ -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()