Re: [CMake] Mixed linking

2015-02-21 Thread Ray Donnelly
On Sat, Feb 21, 2015 at 9:59 AM, Stephen Kelly wrote: > Ray Donnelly wrote: > >>> > >>> > 1) Am I right when I say CMake, Qt and static linking don’t mix ? >>> >>> They should mix fine. > > What I meant when I wrote this was 'they should mix fine, but some > convenience is not available - you need

Re: [CMake] Mixed linking

2015-02-21 Thread Stephen Kelly
Ray Donnelly wrote: >> > >> > 1) Am I right when I say CMake, Qt and static linking don’t mix ? >> >> They should mix fine. What I meant when I wrote this was 'they should mix fine, but some convenience is not available - you need to specify the correct link flags yourself'. That is, it's 'fi

Re: [CMake] Mixed linking

2015-02-21 Thread Stephen Kelly
Ghyslain Leclerc wrote: > Thanks for all the insight. I have been looking at this and quite a few > posts (mostly from you !) to try and understand. I think I get most of > it. > > That being said, I finally got a static executable for my application on > my mac. What I did is build my applicat

Re: [CMake] Mixed linking

2015-02-10 Thread Ghyslain Leclerc
Stephen Kelly wrote:  Ah, right the platform plugin issue. This is likely the reason for not  running on OSX.  CMake 3.1 learned a new feature specifically so that this would become  easier in the future:  http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/7970  qmake generates a

Re: [CMake] Mixed linking

2015-02-06 Thread Norbert Pfeiler
> > 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

[CMake] Mixed linking

2015-02-06 Thread Ray Donnelly
Hi, Apologies that this won't tread correctly (and for directly CC'ing the three participants); I only signed up to the mailing list after I saw this conversation. I'm an MSYS2 developer (and I occasionally hack on Qt build system issues). I've spent a lot of time working on our qt5 and qt5-static

Re: [CMake] Mixed linking

2015-02-06 Thread Stephen Kelly
Norbert Pfeiler wrote: >> >> But I just don't know how to include the plugins. Actually, I always get >> the error about the platform plugin (cocoa in my case). Any tips ? > > > For Windows it’s like this: > > #if defined(Q_OS_WIN) && defined(QT_STATIC) > #include > Q_IMPORT_PLUGIN(QWindowsI

Re: [CMake] Mixed linking

2015-02-06 Thread Norbert Pfeiler
> > But I just don't know how to include the plugins. Actually, I always get > the error about the platform plugin (cocoa in my case). Any tips ? For Windows it’s like this: #if defined(Q_OS_WIN) && defined(QT_STATIC) #include Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) #endif Best, Norbert.

Re: [CMake] Mixed linking

2015-02-06 Thread Ghyslain Leclerc
Hello again. Thanks for the answers. To Stephen Kelly: >> Here are a few questions for the list (hoping someone more knowledgable >> than me will read this and help): >> >> 1) Am I right when I say CMake, Qt and static linking don?t mix ? >They should mix fine. Alright, I won't give up just ye

Re: [CMake] Mixed linking

2015-02-05 Thread Norbert Pfeiler
Hey, to build a static qt executable for windows you may be interested in using msys2. It offers a prepackaged static qt5 with patches for static linking with cmake (as the official files are a bit broken for mingw). Currently you have to define »QT_STATIC« and explicitly include your required plu

Re: [CMake] Mixed linking

2015-02-05 Thread Stephen Kelly
Ghyslain Leclerc wrote: > Here are a few questions for the list (hoping someone more knowledgable > than me will read this and help): > > 1) Am I right when I say CMake, Qt and static linking don’t mix ? They should mix fine. > > I have tried on OS X. I have compiled a static version of Qt,

[CMake] Mixed linking

2015-02-05 Thread Ghyslain Leclerc
Hello, My apologies for the long post, but I think context helps a little. We have a set of applications (4 at the moment) which compile against ITK, VTK, DCMTK and Boost.  All of those things are compiled statically.  So is the application.  We are developing on Windows, OS X and Linux boxes,