title: Cross-compile Qt5 (Mingw) with MySQL driver issue
body: <p>I tried a lot of things I read on documentations or tutorials... But I still can't cross-compile Qt with the MySQL library driver. Story begins:</p>
  
  <p>I have to cross-compile Qt from Linux to Windows (32bits) using MinGW (<code>i686-w64-mingw32-</code> prefix to be precise). I downloaded <code>qtbase-opensource-src-5.9.4</code> and started to work like that:</p>
  
  <pre><code>$ ./configure -prefix [...]/qt-5.9.4 -xplatform win32-g++ -device-option CROSS_COMPILE=/usr/bin/i686-w64-mingw32- -opengl desktop -no-sql-odbc -sql-sqlite -enable-shared -nomake examples -nomake tests -release
  </code></pre>
  
  <p>And it worked. Then, <code>make</code> and <code>make install</code> worked too. But I figured out that there was only the SQLite ".dll" in the <code>plugins/sqldrivers</code> repository. So I tried to compile the MySQL driver and... How can I do that?? If I add <code>-sql-mysql</code> to my <code>./configure ...</code> call, I have to following error:</p>
  
  <pre><code>ERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed.
  </code></pre>
  
  <p>I downloaded MySQL library from the official website to get <code>mysql-5.7.21-win32.zip</code>. But how to link it with qtbase sources? Adding <code>MYSQL_INCDIR=[...]/mysql-5.7.21-win32/include</code> and <code>MYSQL_LIBDIR=[...]/mysql-5.7.21-win32/lib</code> or just <code>MYSQL_PREFIX=[...]/mysql-5.7.21-win32</code> to my <code>./configure ...</code> command results to the same error message.</p>
  
  <p>Any idea please?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I tried to compile the driver like that (with the <code>qmake</code> I built previously):</p>
  
  <pre><code>$ cd qtbase-opensource-src-5.9.4/src/plugins/sqldrivers/mysql
  $ [/*prefix of my previous build*/]/qt-5.9.4/bin/qmake .
  </code></pre>
  
  <p>And the result is:</p>
  
  <pre><code>Project ERROR: Library 'mysql' is not defined.
  </code></pre>