MXS-1220: Always build libmicrohttpd

This allows MaxScale to use the PATCH functionality that's only in the
newer versions of the library. It also removes some of the problems that
exist with older systems that don't support all of the options.
This commit is contained in:
Markus Mäkelä
2017-05-18 11:51:37 +03:00
parent c653a2121d
commit 75e7ac35ed
4 changed files with 20 additions and 4 deletions

View File

@ -71,6 +71,8 @@ if(NOT JANSSON_FOUND)
include(cmake/BuildJansson.cmake) include(cmake/BuildJansson.cmake)
endif() endif()
include(cmake/BuildMicroHttpd.cmake)
include_directories(${JANSSON_INCLUDE_DIR}) include_directories(${JANSSON_INCLUDE_DIR})
# You can find the variables set by this in the FindCURL.cmake file # You can find the variables set by this in the FindCURL.cmake file

View File

@ -24,6 +24,7 @@ other packages in addition to these.
git gcc gcc-c++ ncurses-devel bison flex glibc-devel cmake libgcc perl make \ git gcc gcc-c++ ncurses-devel bison flex glibc-devel cmake libgcc perl make \
libtool openssl openssl-devel libcurl-devel pcre-devel tcl tcl-devel \ libtool openssl openssl-devel libcurl-devel pcre-devel tcl tcl-devel \
systemtap-sdt-devel libuuid libuuid-devel sqlite sqlite-devel systemtap-sdt-devel libuuid libuuid-devel sqlite sqlite-devel
gnutls gcrypt
``` ```
You can install the packages with the following commands. You can install the packages with the following commands.
@ -32,7 +33,7 @@ You can install the packages with the following commands.
sudo yum install git gcc gcc-c++ ncurses-devel bison flex glibc-devel cmake \ sudo yum install git gcc gcc-c++ ncurses-devel bison flex glibc-devel cmake \
libgcc perl make libtool openssl openssl-devel libcurl-devel pcre-devel \ libgcc perl make libtool openssl openssl-devel libcurl-devel pcre-devel \
tcl tcl-devel systemtap-sdt-devel libuuid libuuid-devel sqlite sqlite-devel \ tcl tcl-devel systemtap-sdt-devel libuuid libuuid-devel sqlite sqlite-devel \
libmicrohttpd-devel gnutls gcrypt
``` ```
### Required packages on Ubuntu and Debian systems ### Required packages on Ubuntu and Debian systems
@ -42,7 +43,8 @@ require other packages in addition to these.
``` ```
git build-essential libssl-dev ncurses-dev bison flex cmake perl libtool \ git build-essential libssl-dev ncurses-dev bison flex cmake perl libtool \
libcurl4-openssl-dev libpcre3-dev tlc tcl-dev uuid uuid-dev sqlite3-dev libmicrohttpd-dev libcurl4-openssl-dev libpcre3-dev tlc tcl-dev uuid uuid-dev sqlite3-dev
libgnutls30 libgcrypt20
``` ```
You can install the packages with the following command. You can install the packages with the following command.
@ -50,7 +52,7 @@ You can install the packages with the following command.
``` ```
sudo apt-get install git build-essential libssl-dev ncurses-dev bison flex \ sudo apt-get install git build-essential libssl-dev ncurses-dev bison flex \
cmake perl libtool libcurl4-openssl-dev libpcre3-dev tcl tcl-dev uuid \ cmake perl libtool libcurl4-openssl-dev libpcre3-dev tcl tcl-dev uuid \
uuid-dev libsqlite3-dev libmicrohttpd-dev uuid-dev libsqlite3-dev libgnutls30 libgcrypt20
``` ```
## Preparing the MariaDB MaxScale build ## Preparing the MariaDB MaxScale build

View File

@ -0,0 +1,10 @@
ExternalProject_Add(libmicrohttpd
URL http://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-0.9.54.tar.gz
SOURCE_DIR ${CMAKE_BINARY_DIR}/libmicrohttpd/
CONFIGURE_COMMAND ${CMAKE_BINARY_DIR}/libmicrohttpd//configure --prefix=${CMAKE_BINARY_DIR}/libmicrohttpd/ --enable-shared --with-pic
BINARY_DIR ${CMAKE_BINARY_DIR}/libmicrohttpd/
BUILD_COMMAND make
INSTALL_COMMAND make install)
include_directories(${CMAKE_BINARY_DIR}/libmicrohttpd/include/)
set(MICROHTTPD_LIBRARIES ${CMAKE_BINARY_DIR}/libmicrohttpd/lib/libmicrohttpd.a)

View File

@ -74,7 +74,9 @@ target_link_libraries(maxscale-common
rt rt
m m
stdc++ stdc++
microhttpd gnutls
gcrypt
${MICROHTTPD_LIBRARIES}
) )
add_dependencies(maxscale-common pcre2 connector-c) add_dependencies(maxscale-common pcre2 connector-c)