Skip to content

Commit 2bba7a3

Browse files
committed
Include mariadb-connector-c as a subproject
This is how the MariaDB server does it and this is how MaxScale should do it as well. This also makes it much easier to include the source code in a source tarball as CPack will do this for submodules but won't do it for projects added via ExternalProject_Add.
1 parent 49a62bd commit 2bba7a3

File tree

6 files changed

+9
-60
lines changed

6 files changed

+9
-60
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "mariadb-connector-c"]
2+
path = mariadb-connector-c
3+
url = https://github.com/MariaDB/mariadb-connector-c.git

BUILD/build_deb_local.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ set -x
77

88
cd ./MaxScale
99

10+
git submodule update --init
11+
1012
NCPU=$(grep -c processor /proc/cpuinfo)
1113

1214
if [ "$PARALLEL_BUILD" == "no" ]

BUILD/build_rpm_local.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ set -x
77

88
cd ./MaxScale
99

10+
git submodule update --init
11+
1012
NCPU=$(grep -c processor /proc/cpuinfo)
1113

1214
if [ "$PARALLEL_BUILD" == "no" ]

cmake/BuildMariaDBConnector.cmake

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,8 @@
55
# sets the variables set by FindMariaDBConnector.cmake so that it appears that
66
# the system has the connector.
77

8-
set(MARIADB_CONNECTOR_C_REPO "https://github.com/MariaDB/mariadb-connector-c.git"
9-
CACHE STRING "MariaDB Connector-C Git repository")
10-
11-
# Connector-C tag to use
12-
set(MARIADB_CONNECTOR_C_TAG "v3.2.5"
13-
CACHE STRING "MariaDB Connector-C Git tag")
14-
158
ExternalProject_Add(connector-c
16-
GIT_REPOSITORY ${MARIADB_CONNECTOR_C_REPO}
17-
GIT_TAG ${MARIADB_CONNECTOR_C_TAG}
18-
GIT_SHALLOW TRUE
9+
SOURCE_DIR ${CMAKE_SOURCE_DIR}/mariadb-connector-c/
1910
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/connector-c/install -DWITH_UNIT_TESTS=N -DWITH_CURL=N -DWITH_EXTERNAL_ZLIB=Y
2011
BINARY_DIR ${CMAKE_BINARY_DIR}/connector-c
2112
INSTALL_DIR ${CMAKE_BINARY_DIR}/connector-c/install

cmake/FindMariaDBConnector.cmake

Lines changed: 0 additions & 50 deletions
This file was deleted.

mariadb-connector-c

Submodule mariadb-connector-c added at e730df7

0 commit comments

Comments
 (0)