diff options
| author | Alexander Neundorf <neundorf@kde.org> | 2009-12-19 14:33:24 +0000 | 
|---|---|---|
| committer | Alexander Neundorf <neundorf@kde.org> | 2009-12-19 14:33:24 +0000 | 
| commit | e741edda28738c99531df34980ebb0b00bdc27e8 (patch) | |
| tree | 87f47d69aa864ec4982320c28967afdb2f191179 | |
| parent | 93bcab3adf37b3f12e69d1b2cfe3216c23e641d3 (diff) | |
| download | extra-cmake-modules-e741edda28738c99531df34980ebb0b00bdc27e8.tar.gz extra-cmake-modules-e741edda28738c99531df34980ebb0b00bdc27e8.tar.bz2 | |
-keep in sync with Qt4 from cmake
Alex
svn path=/trunk/KDE/kdelibs/; revision=1063890
| -rw-r--r-- | modules/Qt4ConfigDependentSettings.cmake | 32 | 
1 files changed, 25 insertions, 7 deletions
| diff --git a/modules/Qt4ConfigDependentSettings.cmake b/modules/Qt4ConfigDependentSettings.cmake index 55f7097f..f6062a74 100644 --- a/modules/Qt4ConfigDependentSettings.cmake +++ b/modules/Qt4ConfigDependentSettings.cmake @@ -36,8 +36,7 @@ ENDIF(UNIX)  # 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 +# 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. @@ -49,12 +48,31 @@ SET(QT_QTDBUS_LIB_DEPENDENCIES "")  SET(QT_QTHELP_LIB_DEPENDENCIES ${QT_QTCLUCENE_LIBRARY}) -# 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. +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_CONFIG MATCHES "static") +ENDIF(WIN32  AND  NOT QT_IS_STATIC)  # QtOpenGL dependencies | 
