[Cmake-commits] [cmake-commits] clinton committed Qt4ConfigDependentSettings.cmake 1.3 1.4 UseQt4.cmake 1.23 1.24

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Dec 15 16:16:47 EST 2009


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

Modified Files:
	Qt4ConfigDependentSettings.cmake UseQt4.cmake 
Log Message:
BUG:  Fix #10021 don't specify libraries Qt depends on unless Qt is static.



Index: Qt4ConfigDependentSettings.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Qt4ConfigDependentSettings.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** Qt4ConfigDependentSettings.cmake	18 Nov 2009 22:35:20 -0000	1.3
--- Qt4ConfigDependentSettings.cmake	15 Dec 2009 21:16:45 -0000	1.4
***************
*** 23,28 ****
  # find dependencies for some Qt modules
  # when doing builds against a static Qt, they are required
! # when doing builds against a shared Qt, they are sometimes not required
! # even some Linux distros do not require these dependencies
  # if a user needs the dependencies, and they couldn't be found, they can set
  # the variables themselves.
--- 23,27 ----
  # find dependencies for some Qt modules
  # when doing builds against a static Qt, they are required
! # when doing builds against a shared Qt, they are not required
  # if a user needs the dependencies, and they couldn't be found, they can set
  # the variables themselves.
***************
*** 36,45 ****
  
  
! # build using shared Qt needs -DQT_DLL
! IF(WIN32  AND  NOT QT_CONFIG MATCHES "static")
!   # warning currently only qconfig.pri on Windows potentially contains "static"
!   # so QT_DLL might not get defined properly on other platforms.
    SET(QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_DLL)
! ENDIF(WIN32  AND  NOT QT_CONFIG MATCHES "static")
  
  
--- 35,63 ----
  
  
! IF(WIN32)
!   # On Windows, qconfig.pri has "static" for static library builds
!   IF(QT_CONFIG MATCHES "static")
!     SET(QT_IS_STATIC 1)
!   ENDIF(QT_CONFIG MATCHES "static")
! ELSE(WIN32)
!   # On other platforms, check file extension to know if its static
!   IF(QT_QTCORE_LIBRARY_RELEASE)
!     GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_RELEASE}" EXT)
!     IF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})
!       SET(QT_IS_STATIC 1)
!     ENDIF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})
!   ENDIF(QT_QTCORE_LIBRARY_RELEASE)
!   IF(QT_QTCORE_LIBRARY_DEBUG)
!     GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_DEBUG}" EXT)
!     IF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})
!       SET(QT_IS_STATIC 1)
!     ENDIF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})
!   ENDIF(QT_QTCORE_LIBRARY_DEBUG)
! ENDIF(WIN32)
! 
! # build using shared Qt needs -DQT_DLL on Windows
! IF(WIN32  AND  NOT QT_IS_STATIC)
    SET(QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_DLL)
! ENDIF(WIN32  AND  NOT QT_IS_STATIC)
  
  

Index: UseQt4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/UseQt4.cmake,v
retrieving revision 1.23
retrieving revision 1.24
diff -C 2 -d -r1.23 -r1.24
*** UseQt4.cmake	1 Oct 2009 20:12:39 -0000	1.23
--- UseQt4.cmake	15 Dec 2009 21:16:45 -0000	1.24
***************
*** 81,85 ****
          INCLUDE_DIRECTORIES(${QT_${module}_INCLUDE_DIR})
        ENDIF(QT_USE_${module})
!       SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIBRARY} ${QT_${module}_LIB_DEPENDENCIES})
        FOREACH(depend_module ${QT_${module}_MODULE_DEPENDS})
          SET(QT_USE_${depend_module}_DEPENDS 1)
--- 81,88 ----
          INCLUDE_DIRECTORIES(${QT_${module}_INCLUDE_DIR})
        ENDIF(QT_USE_${module})
!       SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIBRARY})
!       IF(QT_IS_STATIC)
!         SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIB_DEPENDENCIES})
!       ENDIF(QT_IS_STATIC)
        FOREACH(depend_module ${QT_${module}_MODULE_DEPENDS})
          SET(QT_USE_${depend_module}_DEPENDS 1)



More information about the Cmake-commits mailing list