When checking find_package() components, special case qtmain.

Its just a library on Windows only.
Fixes bug #11791.
This commit is contained in:
Clinton Stimpson 2011-02-03 16:37:04 -07:00 committed by Brad King
parent 4c1c358332
commit 7a1027a1b6

View File

@ -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)