MXS-1757: Fix build failure when libsnappy is installed

The Avro C API links against snappy if it is present on the system unless
SNAPPY_FOUND=N is defined. This is not exactly the cleanest way to disable
it but it is the only way to do it.
This commit is contained in:
Markus Mäkelä 2018-04-04 14:18:02 +03:00
parent 599f46ca7b
commit 825d48fe05
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -163,7 +163,8 @@ avro_dir=`echo "$avro_filename" | sed "s/.tar.gz//"`
tar -axf $avro_filename
mkdir $avro_dir/build
pushd $avro_dir/build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC
# The -DSNAPPY_FOUND=N is used to prevent the library from linking against libsnappy (MaxScale doesn't link against it)
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DSNAPPY_FOUND=N
make
sudo make install
popd