Search code examples
qtbuilddependenciesregressionexternal

Building Qt with external dependencies post the 5.8 build regression


Now that the regression, introduced with the new Qt build system in 5.8 is resolved, how do specify external dependencies when building Qt?

Are we back to the old (bad) syntax that was removed in 5.8? Or is there a new way to do it?


Solution

  • From configure -help:

    Each uppercased library name (obtainable with -list-libraries) supports the suffixes _INCDIR, _LIBDIR, _PREFIX (INCDIR=PREFIX/include, LIBDIR=PREFIX/lib), _LIBS, and - on Windows and Darwin - _LIBS_DEBUG and _LIBS_RELEASE. E.g., ICU_PREFIX=/opt/icu42 ICU_LIBS="-licui18n -licuuc -licudata".

    Thus:

    1. configure -list-libraries to get the list of configurable libraries.
    2. For each FOO from the above, provide:

      • FOO_PREFIX or both FOO_LIBDIR and FOO_INCDIR,
      • FOO_LIBS if not empty,
      • optionally FOO_LIBS_DEBUG and FOO_LIBS_RELEASE if there's a difference between the two variants (not optional if FOO_LIBS is empty).

    E.g., to set up MYSQL, assuming configure -list-libraries includes MYSQL:

    configure \
      MYSQL_INCDIR=E:\msys64\mingw64\include\mariadb \
      MYSQL_LIBDIR=E:\msys64\mingw64\lib \
      MYSQL_LIBS="-l mysqlclient"