[CMake] Build flags when using Qt plugins (was: Where is QT_USE_IMPORTED_TARGETS not safe to use?)

Clinton Stimpson clinton at elemtech.com
Wed Jun 22 15:23:22 EDT 2011


On Wednesday, June 22, 2011 12:21:51 pm Stephen Kelly wrote:
> Clinton Stimpson wrote:
> >> And all unit tests then fail with MinGW. The errorString() reported is:
> >> 
> >> QDEBUG : TestBuiltinSyntax::testInsignificantWhitespace(insignificant-
> >> whitespace43) Object QObject(0x0)  "The plugin
> >> 'C:/software/grantlee/qtcreator-
> 
> build/grantlee/0.1/grantlee_defaulttags.dll
> 
> >> ' uses incompatible Qt library. (Cannot mix debug and release
> >> libraries.)"
> >> 
> >> 
> >> Is this unexpected? I'm not familiar enough with windows tools to
> >> inspect the binaries and see what's going on. Any help appreciated.
> > 
> > Do you have a way to check the actual compile flags used to build the
> > code?
> > 
> > Clint
> 
> I did two clean builds with
> 
> cmake .. -G "MinGW Makefiles" && mingw32-make VERBOSE=1
> 
> The output is attached, but I'm not certain it's very helpful. Let me know
> if anything else would be useful. I can maybe try to create a smaller
> plugin using qt example for easy reproduction of the issue.
> 

Also the files in templates/lib are not compiled with flags from QT_USE_FILE.
You can tell that by whether files are compiled with -DQT_CORE_LIB.

-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com


More information about the CMake mailing list