[CMake] Problem with Qt4 and release mode on windows

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Thu Nov 8 13:41:13 EST 2007


clinton at elemtech.com schrieb:
>> when I compile a qt plugin in release mode (and therefore link against
>> release qt lib) I've the problem that cmake does not set -DQT_NO_DEBUG .
> 
> 
> In any file you use the Q_EXPORT_PLUGIN2 macro, you can put something like 
> this:
> #if defined(NDEBUG)
> # define QT_NO_DEBUG
> #endif
> at the top of the file.
> 
But this is more a hack than a solution - don't think the kde devs will
accept this.
> I don't see a way to do something like
> ADD_DEFINTIONS(-DQT_NO_DEBUG)
> for a release configuration only.
> 
I now set the cxx_flags_BUILD_TYPE directly to solve it for now. But
imho there should be something in FindQt4.cmake to adress this issue.


Christian


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20071108/7de0ee54/signature.pgp


More information about the CMake mailing list