PDA

View Full Version : Marble as QT Designer Plugin



chris.penny
2nd October 2009, 16:39
Hello,
I am trying to build Marble(version 0.8.0) as a QT Designer plugin. I am using MinGW on Windows XP. My QT libraries (I have tried versions 4.5 and 4.6) were built with both debugging and release libraries. I built marble using the following
cmake -DQTONLY=ON -G "MinGW Makefiles" -DWITH_DESIGNER_PLUGIN=ON ../marble
mingw32-make
mingw32-make install

This seemed to work fine, but when I ran designer it complained that the marble plugin uses an incompatible QT library. Doing some research, apparently QT Designer is build as release when you configure QT for debug-and-release, and therefore, plugins should be release as well. Is there a way to make marble build in release mode? This is easy with qmake and .pro files, but Marble uses cmake.

I have also tried building marble against qt libraries configured with release only, and debug only. But this failed when linking libmarblewidget.dll.

Any suggestions?

Thanks in advance,
Chris

SaroEngels
16th October 2009, 14:51
to specify the build type for cmake projects, simply add -DCMAKE_BUILD_TYPE=<buildtype> where buildtype is one of RelWithDebInfo, Release, Debug,... so to build Marble as Release use
cmake -DQTONLY=ON -G "MinGW Makefiles" -DWITH_DESIGNER_PLUGIN=ON -DCMAKE_BUILD_TYPE=Release ../marble
mingw32-make
mingw32-make install
(be aware that RelWithDebInfo should work too, but increases the size of the executables by a lot.).