On 02/21/2013 06:42 AM, Stephen Kelly wrote: > I'm still trying to figure out the appropriate fix for > > https://bugreports.qt-project.org/browse/QTBUG-29186 > > In a previous thread, it was reported that something similar was done with > Qt 4, but it's not clear to me how - FindQt4 and related files don't seem to > do it. > > > http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/45184/focus=45220
CMake supports an arbitrary list of configurations so it cannot know how to map imported configurations to the current project's configs automatically. This is the purpose of MAP_IMPORTED_CONFIG_<CONFIG>: http://www.cmake.org/cmake/help/v2.8.10/cmake.html#prop_tgt:MAP_IMPORTED_CONFIG_CONFIG but of course Qt5 doesn't know the consumer's configurations so it would have to be up to the consumer to set the property. As documented in the above property, when the property is not set no matching configs are available CMake just uses the first available configuration. You could solve this issue in the default case by switching the order to _populate_imported_target_properties(RELEASE "Qt5Core.dll" "Qt5Core.lib" ) _populate_imported_target_properties(DEBUG "Qt5Cored.dll" "Qt5Cored.lib" ) so that RELEASE is chosen for every consumer configuration except DEBUG. -Brad -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers