[Cmake-commits] [cmake-commits] alex committed FindQt4.cmake 1.184 1.185

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Dec 23 09:58:43 EST 2009


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv28997

Modified Files:
	FindQt4.cmake 
Log Message:
fix logic of _QT4_ADJUST_LIB_VARS() wrt. release- and debug libraries

Now the case that both the release- and the debug-version of a library is
handled first, because otherwise we always ran into this branch, since the
debug-only and the release-only branch also set both variables.

Alex


Index: FindQt4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindQt4.cmake,v
retrieving revision 1.184
retrieving revision 1.185
diff -C 2 -d -r1.184 -r1.185
*** FindQt4.cmake	20 Dec 2009 15:34:13 -0000	1.184
--- FindQt4.cmake	23 Dec 2009 14:58:34 -0000	1.185
***************
*** 830,833 ****
--- 830,847 ----
      IF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
  
+       # if the release- as well as the debug-version of the library have been found:
+       IF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
+         # if the generator supports configuration types then set
+         # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
+         IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+           SET(QT_${basename}_LIBRARY       optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
+         ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+           # if there are no configuration types and CMAKE_BUILD_TYPE has no value
+           # then just use the release libraries
+           SET(QT_${basename}_LIBRARY       ${QT_${basename}_LIBRARY_RELEASE} )
+         ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+         SET(QT_${basename}_LIBRARIES       optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
+       ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
+ 
        # if only the release version was found, set the debug variable also to the release version
        IF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG)
***************
*** 844,860 ****
        ENDIF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE)
  
!       IF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
!         # if the generator supports configuration types then set
!         # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
!         IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
!           SET(QT_${basename}_LIBRARY       optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
!         ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
!           # if there are no configuration types and CMAKE_BUILD_TYPE has no value
!           # then just use the release libraries
!           SET(QT_${basename}_LIBRARY       ${QT_${basename}_LIBRARY_RELEASE} )
!         ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
!         SET(QT_${basename}_LIBRARIES       optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
!       ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
! 
        SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE STRING "The Qt ${basename} library" FORCE)
  
--- 858,862 ----
        ENDIF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE)
  
!       # put the value in the cache:
        SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE STRING "The Qt ${basename} library" FORCE)
  



More information about the Cmake-commits mailing list