[CMake] using only release versions of QT libraries

John Drescher drescherjm at gmail.com
Thu Sep 9 15:21:59 EDT 2010


On Thu, Sep 9, 2010 at 3:06 PM, edA-qa mort-ora-y <eda-qa at disemia.com> wrote:
> My cmake file has the fairly standard QT setup:
>
> find_package(Qt4 COMPONENTS QtCore QtGui QtXml QtNetwork QtSvg QtOpenGL
> QtMain REQUIRED)
> include(${QT_USE_FILE})
>
>
> and then later use ${QT_LIBRARIES}
>
> However, this uses the debug libraries when I do a debug build. I don't
> want that. I want to just use the Release libraries for QT. Is there an
> easy way to do this?
>

Do not do that. Your application will crash (in unexpected ways) if
you mix debug and release libraries in visual studio. You also can not
mix compiler versions.

John


More information about the CMake mailing list