summaryrefslogtreecommitdiffstats
path: root/Modules/FindQt4.cmake
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2011-02-03 23:37:04 (GMT)
committerBrad King <brad.king@kitware.com>2011-02-04 14:01:55 (GMT)
commit7a1027a1b6d1544bae9329f42c0872a551859572 (patch)
tree076c4bdad23c4f3e85c132954fa2e8a5d4f8d317 /Modules/FindQt4.cmake
parent4c1c358332e9dd2b9ec165450f64d3a542e3433a (diff)
downloadCMake-7a1027a1b6d1544bae9329f42c0872a551859572.zip
CMake-7a1027a1b6d1544bae9329f42c0872a551859572.tar.gz
CMake-7a1027a1b6d1544bae9329f42c0872a551859572.tar.bz2
When checking find_package() components, special case qtmain.
Its just a library on Windows only. Fixes bug #11791.
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r--Modules/FindQt4.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index ec04cd2..31fa43c 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -1112,7 +1112,13 @@ IF( Qt4_FIND_COMPONENTS )
SET(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR)
FOREACH( component ${Qt4_FIND_COMPONENTS} )
STRING( TOUPPER ${component} _COMPONENT )
- SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_INCLUDE_DIR QT_${_COMPONENT}_LIBRARY)
+ if(${_COMPONENT} STREQUAL "QTMAIN")
+ IF(Q_WS_WIN)
+ SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_LIBRARY)
+ ENDIF(Q_WS_WIN)
+ else(${_COMPONENT} STREQUAL "QTMAIN")
+ SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_INCLUDE_DIR QT_${_COMPONENT}_LIBRARY)
+ endif(${_COMPONENT} STREQUAL "QTMAIN")
ENDFOREACH( component )
if(Qt4_FIND_COMPONENTS MATCHES QtGui)