[CMake] qmake / cmake moc options consistency

Clinton Stimpson clinton at elemtech.com
Wed Aug 6 20:39:56 EDT 2008


On Jul 31, 2008, at 8:12 AM, Stephan Diederich wrote:

> Hi,
>
> I just found an issue while moc'ing one of our headers.
> We have some #ifndeffed slots in that header which depend on -DWIN32.
> A default qmake ".pro" project adds
> -D_MSC_VER=1400 -DWIN32
> on windows, MSVC8. The  QT4_WRAP_CPP does not define WIN32.
> (_WIN32 seems to be defined by, but I've no idea where it comes from)
>
> I could work around the problem by using the options from QT4_WRAP_CPP
> like this:
> QT4_WRAP_CPP(projects_MOC_SRCS ${projects_MOC_HDRS} OPTIONS "- 
> DWIN32").
>
> Is this just an oversight?
>
>

Yes, it is an oversight.  Could you make a bug report for this, so it  
doesn't get lost?

Clint



More information about the CMake mailing list