From 81ed973b1a7d06b2c6cafcca4d7f6e39a45ae67d Mon Sep 17 00:00:00 2001
From: Sergei Petrunia <psergey@askmonty.org>
Date: Wed, 11 Jan 2017 22:13:52 +0300
Subject: [PATCH] MariaRocks port: fix the build: fetch git submodules earlier

mariadb_connector_c fetches all submodules in the tre.
Invoke it betfore the CONFIGURE_PLUGINS().

This is generally useful, as one can imagine many plugins have
submodules.
---
 CMakeLists.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 731afdde3d8..1a9d6079c7f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -363,6 +363,10 @@ IF(WITH_UNIT_TESTS)
 ENDIF()
 
 SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "")
+
+# mariadb_connector_c fetches submodules which is useful for plugins
+INCLUDE(mariadb_connector_c) # this does ADD_SUBDIRECTORY(libmariadb)
+
 # Add storage engines and plugins.
 CONFIGURE_PLUGINS()
 
@@ -372,7 +376,6 @@ ADD_SUBDIRECTORY(strings)
 ADD_SUBDIRECTORY(vio)
 ADD_SUBDIRECTORY(mysys)
 ADD_SUBDIRECTORY(mysys_ssl)
-INCLUDE(mariadb_connector_c) # this does ADD_SUBDIRECTORY(libmariadb)
 ADD_SUBDIRECTORY(client)
 ADD_SUBDIRECTORY(extra)
 ADD_SUBDIRECTORY(libservices)
-- 
2.30.9