On 09/09/2010 09:06 PM, edA-qa mort-ora-y 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?
You could use imported targets and set the IMPORTED_LOCATION_DEBUG
properties to IMPORTED_LOCATION_RELEASE for each Qt module, e.g.:
SET(QT_USE_IMPORTED_TARGETS TRUE)
FIND_PACKAGE(Qt4 ...)
INCLUDE(${QT_USE_FILE})
FOREACH(i IN LISTS QT_LIBRARIES)
GET_TARGET_PROPERTY(p ${i} IMPORTED_LOCATION_RELEASE)
SET_TARGET_PROPERTIES(${i} PROPERTIES IMPORTED_LOCATION_DEBUG ${p})
ENDFOREACH()
Anyway, take John's warning seriously.
Regards,
Michael
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake