diff options
Diffstat (limited to 'cmake/macros/FindMySQLVersion.c')
-rw-r--r-- | cmake/macros/FindMySQLVersion.c | 18 |
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; +} |