>
> Norbert Pfeiler wrote:
> > Currently you have to define »QT_STATIC«
> You shouldn't need to do this. If you use MSYS2's
> mingw-w64-{i686,x86_64}-qt5-static then that will be defined for you.


I have both *-qt5 (for dev) and *-qt5-static (for deploy) installed and
append the root of qt5-static to CMAKE_PREFIX_PATH for cmake to prefer the
static to the shared version.
QT_STATIC is not defined in this case.

Norbert Pfeiler wrote:
> > For Windows it’s like this:
> >
> > #if defined(Q_OS_WIN) && defined(QT_STATIC)
> > #include <QtPlugin>
> > Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
> > #endif
> Again, if you use MSYS2's mingw-w64-{i686,x86_64}-cmake then you
> should not need to do this either, because of


This is also not the case in the configuration above.
I don’t have to explicitly link the platform plugin though (after adding
Q_IMPORT_PLUGIN).

These 2 additions are way less of a hassle than having to rename *.lib to
*.a in all the qt cmake files and explicitly specifying all transitive qt
link deps, which was necessary before.
So thanks for your work.

Looking forward to:

> > They should mix fine.


Best, Norbert.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to