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

This commit is contained in:
Shauren
2025-08-30 19:25:47 +02:00
parent 4124068c47
commit b386971229
4 changed files with 112 additions and 69 deletions
+8 -1
View File
@@ -8,10 +8,17 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
find_package(MySQL REQUIRED COMPONENTS lib)
set(MYSQL_MIN_VERSION_MySQL 8.0.34)
set(MYSQL_MIN_VERSION_MariaDB 10.4)
find_package(MySQL COMPONENTS lib)
add_library(mysql INTERFACE)
target_compile_definitions(mysql
INTERFACE
TRINITY_MYSQL_FLAVOR="${MYSQL_FLAVOR}"
TRINITY_REQUIRED_MYSQL_VERSION="${MYSQL_MIN_VERSION_${MYSQL_FLAVOR}}")
target_link_libraries(mysql
INTERFACE
MySQL::MySQL)