aboutsummaryrefslogtreecommitdiff
path: root/cmake/macros/FindMySQLVersion.c
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-08-30 19:25:47 +0200
committerShauren <shauren.trinity@gmail.com>2025-08-30 22:55:25 +0200
commit521ec0b44459817964c8dedb3fac16e9b8c661f1 (patch)
tree65bbbb815200628f9e7da08483916722054a7d8f /cmake/macros/FindMySQLVersion.c
parent101b0e07413899af9ba6c78b701daaca867e7cff (diff)
Dep/MySQL: Move required version checks to CMake, raise required version to 8.0.34 and remove strict compiled<->runtime version match requirement from non-Windows platforms
(cherry picked from commit b386971229f5ad389be9e22cbb96c39d79ac7beb)
Diffstat (limited to 'cmake/macros/FindMySQLVersion.c')
-rw-r--r--cmake/macros/FindMySQLVersion.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/macros/FindMySQLVersion.c b/cmake/macros/FindMySQLVersion.c
new file mode 100644
index 00000000000..80a9f2ec043
--- /dev/null
+++ b/cmake/macros/FindMySQLVersion.c
@@ -0,0 +1,18 @@
+#include <mysql.h>
+#include <stdio.h>
+
+int main()
+{
+ printf("{ "
+ "\"version\": \"%d.%d.%d\", "
+ "\"flavor\": \"%s\""
+ " }",
+ MYSQL_VERSION_ID / 10000, (MYSQL_VERSION_ID / 100) % 100, MYSQL_VERSION_ID % 100,
+#ifdef MARIADB_VERSION_ID
+ "MariaDB"
+#else
+ "MySQL"
+#endif
+ );
+ return 0;
+}