Avoid annoying FindMySQL warning under Windows

This warning will almost always be given in Windows build, which is not
really helpful.
This commit is contained in:
Vadim Zeitlin
2025-06-07 20:07:23 +02:00
parent 4f1d2e959f
commit 320a40b93c

View File

@@ -97,7 +97,9 @@ if (NOT TARGET MySQL::MySQL)
endif()
endif()
if (NOT MySQL_LIBRARIES)
# Under Windows, it's normal to not have neither pkg-config nor mysql_config,
# so don't warn about it, it's just annoying.
if (NOT MySQL_LIBRARIES AND NOT WIN32)
message(WARNING "Falling back to manual MySQL search -> this might miss dependencies")
endif()