diff options
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r-- | Modules/FindQt4.cmake | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 66f7882..c3ede57 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -565,13 +565,17 @@ IF (QT4_QMAKE_FOUND) SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_DEBUG}) SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_DEBUG}) ENDIF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE) - + IF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE) - IF(NOT MSVC) - SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE}) - ELSE(NOT MSVC) + # 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}) - ENDIF(NOT MSVC) + 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) |