Statically Link 3rd Party Library Built with CMake into Qt 5.12.11 Project Built with QMake in Qt Creator

Viewed 17

Hi I am trying to statically link the cutelyst simplemail library into my Qt project. I've been scouring the web or several hours now without a definitive soution. Cutelyst simplemail is built with CMake while my project is built with QMake and Qt 5.12.11 in Qt Creator. I have gotten the dynamic linking to work but am having trouble with static linking. Here are my questions:

  1. How do I build the cutelyst simpemail project statically using CMake?
  2. After building it statically how do I add it to my Qt project? Is it as simple as a LIBS+= or right-clicking on the project in Qt Creator and going to add library and following the wizard?
  3. Do I need to rebuild Qt static and integrate the cutelyst simplemail library into it?
  4. Are there any other approaches or information I've missed?

A minor detail that might complicate things is that cutelyst simplemail depends on the Qt5Core and Qt5Network libraries.

Of course this assumes all of this is possible... Thanks!

0 Answers
Related