SVN commit 541628 by mojo:

If we are building kdelibs with debug build type then choose the debug Qt 
libraries. 
Before, if both were available, the release Qt libs were always chosen, which 
makes msvc apps crash.

I think this finnishes the build-system cycle for the win32 port, for now :)

CCMAIL: [email protected]
CCMAIL: [EMAIL PROTECTED]

 M  +7 -2      FindQt4.cmake  


--- trunk/KDE/kdelibs/cmake/modules/FindQt4.cmake #541627:541628
@@ -598,8 +598,13 @@
       ENDIF (QT_${basename}_LIBRARY_DEBUG AND NOT 
QT_${basename}_LIBRARY_RELEASE)
 
       IF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
-        SET(QT_${basename}_LIBRARY         ${QT_${basename}_LIBRARY_RELEASE})
-        SET(QT_${basename}_LIBRARIES       optimized 
${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
+        IF(CMAKE_BUILD_TYPE MATCHES Debug)
+          SET(QT_${basename}_LIBRARY       ${QT_${basename}_LIBRARY_DEBUG})
+          SET(QT_${basename}_LIBRARIES     ${QT_${basename}_LIBRARY_DEBUG})
+        ELSE(CMAKE_BUILD_TYPE MATCHES Debug)
+          SET(QT_${basename}_LIBRARY       ${QT_${basename}_LIBRARY_RELEASE})
+          SET(QT_${basename}_LIBRARIES     optimized 
${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
+        ENDIF(CMAKE_BUILD_TYPE MATCHES Debug)
       ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
 
       SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE FILEPATH "The 
Qt ${basename} library")
_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem

Reply via email to