Commit 75cb581c authored by Thomas Ives's avatar Thomas Ives
Browse files

FindMySQL.cmake: Do not call try_run when cross-compiling

`try_run` produces an `AUTHOR_WARNING` if we run it when cross-compiling
without `CMAKE_CROSSCOMPILING_EMULATOR` set suggesting we should avoid
this.
parent 2f3271c7
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -137,7 +137,8 @@ if (MySQL_EXECUTABLE)
    set(MySQL_exe_FOUND TRUE)
endif()

if (NOT MySQL_INCLUDE_DIR)
if (NOT MySQL_INCLUDE_DIR OR
    (CMAKE_CROSSCOMPILING AND NOT CMAKE_CROSSCOMPILING_EMULATOR))
    set(MySQL_VERSION MySQL_VERSION-NOTFOUND)
endif()