@ -48,8 +48,9 @@
#
#
# m a c r o QT4_WRAP_CPP ( outfiles inputfile ... OPTIONS ... )
# m a c r o QT4_WRAP_CPP ( outfiles inputfile ... OPTIONS ... )
# c r e a t e m o c c o d e f r o m a l i s t o f f i l e s c o n t a i n i n g Q t c l a s s w i t h
# c r e a t e m o c c o d e f r o m a l i s t o f f i l e s c o n t a i n i n g Q t c l a s s w i t h
# t h e Q _ O B J E C T d e c l a r a t i o n . O p t i o n s m a y b e g i v e n t o m o c , s u c h a s t h o s e f o u n d
# t h e Q _ O B J E C T d e c l a r a t i o n . P e r - d i r e c o t r y p r e p r o c e s s o r d e f i n i t i o n s
# w h e n e x e c u t i n g " m o c - h e l p "
# a r e a l s o a d d e d . O p t i o n s m a y b e g i v e n t o m o c , s u c h a s t h o s e f o u n d
# w h e n e x e c u t i n g " m o c - h e l p " .
#
#
# m a c r o QT4_WRAP_UI ( outfiles inputfile ... OPTIONS ... )
# m a c r o QT4_WRAP_UI ( outfiles inputfile ... OPTIONS ... )
# c r e a t e c o d e f r o m a l i s t o f Q t d e s i g n e r u i f i l e s .
# c r e a t e c o d e f r o m a l i s t o f Q t d e s i g n e r u i f i l e s .
@ -102,11 +103,14 @@
# i n t e r f a c e f i l e i s c o n s t r u c t e d f r o m t h e b a s e n a m e o f t h e h e a d e r w i t h
# i n t e r f a c e f i l e i s c o n s t r u c t e d f r o m t h e b a s e n a m e o f t h e h e a d e r w i t h
# t h e s u f f i x . x m l a p p e n d e d .
# t h e s u f f i x . x m l a p p e n d e d .
#
#
# m a c r o QT4_CREATE_TRANSLATION ( qm_files sources ... ts_files ... )
# m a c r o QT4_CREATE_TRANSLATION ( qm_files directories ... sources ...
# t s _ f i l e s . . . O P T I O N S . . . )
# o u t : q m _ f i l e s
# o u t : q m _ f i l e s
# i n : s o u r c e s t s _ f i l e s
# i n : d i r e c t o r i e s s o u r c e s t s _ f i l e s
# o p t i o n s : f l a g s t o p a s s t o l u p d a t e , s u c h a s - e x t e n s i o n s t o s p e c i f y
# e x t e n s i o n s f o r a d i r e c t o r y s c a n .
# g e n e r a t e s c o m m a n d s t o c r e a t e . ts ( vie lupdate ) a n d . q m
# g e n e r a t e s c o m m a n d s t o c r e a t e . ts ( vie lupdate ) a n d . q m
# ( v i a l r e l e a s e ) - f i l e s f r o m s o u r c e s . T h e t s f i l e s a r e
# ( v i a l r e l e a s e ) - f i l e s f r o m di r e c t o r i e s a n d / o r so u r c e s . T h e t s f i l e s a r e
# c r e a t e d a n d / o r u p d a t e d i n t h e s o u r c e tree ( unless given with full paths ) .
# c r e a t e d a n d / o r u p d a t e d i n t h e s o u r c e tree ( unless given with full paths ) .
# T h e q m f i l e s a r e g e n e r a t e d i n t h e b u i l d t r e e .
# T h e q m f i l e s a r e g e n e r a t e d i n t h e b u i l d t r e e .
# U p d a t i n g t h e t r a n s l a t i o n s c a n b e d o n e b y a d d i n g t h e q m _ f i l e s
# U p d a t i n g t h e t r a n s l a t i o n s c a n b e d o n e b y a d d i n g t h e q m _ f i l e s
@ -256,6 +260,19 @@
# ( T h e y m a k e n o s e n s e i n Q t 4 )
# ( T h e y m a k e n o s e n s e i n Q t 4 )
# Q T _ Q T _ L I B R A R Y Q t - L i b r a r y i s n o w s p l i t
# Q T _ Q T _ L I B R A R Y Q t - L i b r a r y i s n o w s p l i t
# I f Q t 3 h a s a l r e a d y b e e n f o u n d , f a i l .
IF ( QT_QT_LIBRARY )
IF ( Qt4_FIND_REQUIRED )
MESSAGE ( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project." )
ELSE ( Qt4_FIND_REQUIRED )
IF ( NOT Qt4_FIND_QUIETLY )
MESSAGE ( STATUS "Qt3 and Qt4 cannot be used together in one project." )
ENDIF ( NOT Qt4_FIND_QUIETLY )
RETURN ( )
ENDIF ( Qt4_FIND_REQUIRED )
ENDIF ( QT_QT_LIBRARY )
INCLUDE ( CheckSymbolExists )
INCLUDE ( CheckSymbolExists )
INCLUDE ( MacroAddFileDependencies )
INCLUDE ( MacroAddFileDependencies )
@ -267,6 +284,7 @@ SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
# m a c r o f o r a s k i n g q m a k e t o p r o c e s s p r o f i l e s
# m a c r o f o r a s k i n g q m a k e t o p r o c e s s p r o f i l e s
MACRO ( QT_QUERY_QMAKE outvar invar )
MACRO ( QT_QUERY_QMAKE outvar invar )
IF ( QT_QMAKE_EXECUTABLE )
FILE ( WRITE ${ CMAKE_CURRENT_BINARY_DIR } ${ CMAKE_FILES_DIRECTORY } /CMakeTmpQmake/tmp.pro
FILE ( WRITE ${ CMAKE_CURRENT_BINARY_DIR } ${ CMAKE_FILES_DIRECTORY } /CMakeTmpQmake/tmp.pro
" message ( CMAKE_MESSAGE< $ $ ${ invar } > ) " )
" message ( CMAKE_MESSAGE< $ $ ${ invar } > ) " )
@ -289,6 +307,7 @@ MACRO(QT_QUERY_QMAKE outvar invar)
STRING ( REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${ outvar } "${_qmake_query_output}" )
STRING ( REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${ outvar } "${_qmake_query_output}" )
ENDIF ( _qmake_result )
ENDIF ( _qmake_result )
ENDIF ( QT_QMAKE_EXECUTABLE )
ENDMACRO ( QT_QUERY_QMAKE )
ENDMACRO ( QT_QUERY_QMAKE )
GET_FILENAME_COMPONENT ( qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME )
GET_FILENAME_COMPONENT ( qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME )
@ -455,6 +474,7 @@ IF (QT4_QMAKE_FOUND)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
FIND_PATH ( QT_QTCORE_INCLUDE_DIR QtGlobal
FIND_PATH ( QT_QTCORE_INCLUDE_DIR QtGlobal
P A T H S
$ { Q T _ H E A D E R S _ D I R } / Q t C o r e
$ { Q T _ H E A D E R S _ D I R } / Q t C o r e
$ { Q T _ L I B R A R Y _ D I R } / Q t C o r e . f r a m e w o r k / H e a d e r s
$ { Q T _ L I B R A R Y _ D I R } / Q t C o r e . f r a m e w o r k / H e a d e r s
N O _ D E F A U L T _ P A T H
N O _ D E F A U L T _ P A T H
@ -471,9 +491,9 @@ IF (QT4_QMAKE_FOUND)
ENDIF ( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR )
ENDIF ( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR )
IF ( NOT QT_INCLUDE_DIR )
IF ( NOT QT_INCLUDE_DIR )
IF ( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED )
IF ( Qt4_FIND_REQUIRED )
MESSAGE ( FATAL_ERROR "Could NOT find QtGlobal header" )
MESSAGE ( FATAL_ERROR "Could NOT find QtGlobal header" )
ENDIF ( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED )
ENDIF ( Qt4_FIND_REQUIRED )
ENDIF ( NOT QT_INCLUDE_DIR )
ENDIF ( NOT QT_INCLUDE_DIR )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@ -509,10 +529,6 @@ IF (QT4_QMAKE_FOUND)
#
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
IF ( QT_USE_FRAMEWORKS )
SET ( QT_DEFINITIONS ${ QT_DEFINITIONS } -F ${ QT_LIBRARY_DIR } -L ${ QT_LIBRARY_DIR } )
ENDIF ( QT_USE_FRAMEWORKS )
# S e t Q T _ Q T 3 S U P P O R T _ I N C L U D E _ D I R
# S e t Q T _ Q T 3 S U P P O R T _ I N C L U D E _ D I R
FIND_PATH ( QT_QT3SUPPORT_INCLUDE_DIR Qt3Support
FIND_PATH ( QT_QT3SUPPORT_INCLUDE_DIR Qt3Support
P A T H S
P A T H S
@ -701,11 +717,11 @@ IF (QT4_QMAKE_FOUND)
# S e t Q T _ Q T 3 S U P P O R T _ L I B R A R Y
# S e t Q T _ Q T 3 S U P P O R T _ L I B R A R Y
FIND_LIBRARY ( QT_QT3SUPPORT_LIBRARY_RELEASE NAMES Qt3Support Qt3Support4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QT3SUPPORT_LIBRARY_RELEASE NAMES Qt3Support Qt3Support4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QT3SUPPORT_LIBRARY_DEBUG NAMES Qt3Support_debug Qt3Supportd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QT3SUPPORT_LIBRARY_DEBUG NAMES Qt3Support_debug Qt3Supportd Qt3Supportd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ Q T G U I _ L I B R A R Y
# S e t Q T _ Q T G U I _ L I B R A R Y
FIND_LIBRARY ( QT_QTGUI_LIBRARY_RELEASE NAMES QtGui QtGui4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTGUI_LIBRARY_RELEASE NAMES QtGui QtGui4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTGUI_LIBRARY_DEBUG NAMES QtGui_debug QtGuid 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTGUI_LIBRARY_DEBUG NAMES QtGui_debug QtGuid QtGuid 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ Q T M O T I F _ L I B R A R Y
# S e t Q T _ Q T M O T I F _ L I B R A R Y
IF ( Q_WS_X11 )
IF ( Q_WS_X11 )
@ -715,7 +731,7 @@ IF (QT4_QMAKE_FOUND)
# S e t Q T _ Q T N E T W O R K _ L I B R A R Y
# S e t Q T _ Q T N E T W O R K _ L I B R A R Y
FIND_LIBRARY ( QT_QTNETWORK_LIBRARY_RELEASE NAMES QtNetwork QtNetwork4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTNETWORK_LIBRARY_RELEASE NAMES QtNetwork QtNetwork4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTNETWORK_LIBRARY_DEBUG NAMES QtNetwork_debug QtNetworkd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTNETWORK_LIBRARY_DEBUG NAMES QtNetwork_debug QtNetworkd QtNetworkd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ Q T N S P L U G I N _ L I B R A R Y
# S e t Q T _ Q T N S P L U G I N _ L I B R A R Y
FIND_LIBRARY ( QT_QTNSPLUGIN_LIBRARY_RELEASE NAMES QtNsPlugin PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTNSPLUGIN_LIBRARY_RELEASE NAMES QtNsPlugin PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
@ -723,19 +739,19 @@ IF (QT4_QMAKE_FOUND)
# S e t Q T _ Q T O P E N G L _ L I B R A R Y
# S e t Q T _ Q T O P E N G L _ L I B R A R Y
FIND_LIBRARY ( QT_QTOPENGL_LIBRARY_RELEASE NAMES QtOpenGL QtOpenGL4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTOPENGL_LIBRARY_RELEASE NAMES QtOpenGL QtOpenGL4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTOPENGL_LIBRARY_DEBUG NAMES QtOpenGL_debug QtOpenGLd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTOPENGL_LIBRARY_DEBUG NAMES QtOpenGL_debug QtOpenGLd QtOpenGLd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ Q T S Q L _ L I B R A R Y
# S e t Q T _ Q T S Q L _ L I B R A R Y
FIND_LIBRARY ( QT_QTSQL_LIBRARY_RELEASE NAMES QtSql QtSql4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTSQL_LIBRARY_RELEASE NAMES QtSql QtSql4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTSQL_LIBRARY_DEBUG NAMES QtSql_debug QtSqld 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTSQL_LIBRARY_DEBUG NAMES QtSql_debug QtSqld QtSqld 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ Q T X M L _ L I B R A R Y
# S e t Q T _ Q T X M L _ L I B R A R Y
FIND_LIBRARY ( QT_QTXML_LIBRARY_RELEASE NAMES QtXml QtXml4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTXML_LIBRARY_RELEASE NAMES QtXml QtXml4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTXML_LIBRARY_DEBUG NAMES QtXml_debug QtXmld 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTXML_LIBRARY_DEBUG NAMES QtXml_debug QtXmld QtXmld 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ Q T S V G _ L I B R A R Y
# S e t Q T _ Q T S V G _ L I B R A R Y
FIND_LIBRARY ( QT_QTSVG_LIBRARY_RELEASE NAMES QtSvg QtSvg4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTSVG_LIBRARY_RELEASE NAMES QtSvg QtSvg4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTSVG_LIBRARY_DEBUG NAMES QtSvg_debug QtSvgd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTSVG_LIBRARY_DEBUG NAMES QtSvg_debug QtSvgd QtSvgd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ Q T U I T O O L S _ L I B R A R Y
# S e t Q T _ Q T U I T O O L S _ L I B R A R Y
FIND_LIBRARY ( QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools QtUiTools4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools QtUiTools4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
@ -747,22 +763,30 @@ IF (QT4_QMAKE_FOUND)
# S e t Q T _ Q T T E S T _ L I B R A R Y
# S e t Q T _ Q T T E S T _ L I B R A R Y
FIND_LIBRARY ( QT_QTTEST_LIBRARY_RELEASE NAMES QtTest QtTest4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTTEST_LIBRARY_RELEASE NAMES QtTest QtTest4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTTEST_LIBRARY_DEBUG NAMES QtTest_debug QtTest _ debug4 QtTestd4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTTEST_LIBRARY_DEBUG NAMES QtTest_debug QtTest d QtTestd4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ Q T D B U S _ L I B R A R Y
# S e t Q T _ Q T D B U S _ L I B R A R Y
# T h i s w a s i n t r o d u c e d w i t h Q t 4 . 2 , w h e r e a l s o t h e n a m i n g s c h e m e f o r d e b u g l i b s w a s c h a n g e d
# T h i s w a s i n t r o d u c e d w i t h Q t 4 . 2 , w h e r e a l s o t h e n a m i n g s c h e m e f o r d e b u g l i b s w a s c h a n g e d
# S o d o e s a n y o f t h e d e b u g l i b n a m e s l i s t e d h e r e a c t u a l l y e x i s t ?
# S o d o e s a n y o f t h e d e b u g l i b n a m e s l i s t e d h e r e a c t u a l l y e x i s t ?
FIND_LIBRARY ( QT_QTDBUS_LIBRARY_RELEASE NAMES QtDBus QtDBus4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTDBUS_LIBRARY_RELEASE NAMES QtDBus QtDBus4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTDBUS_LIBRARY_DEBUG NAMES QtDBus_debug QtDBus _ debug4 QtDBusd4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTDBUS_LIBRARY_DEBUG NAMES QtDBus_debug QtDBus d QtDBusd4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ Q T S C R I P T _ L I B R A R Y
# S e t Q T _ Q T S C R I P T _ L I B R A R Y
FIND_LIBRARY ( QT_QTSCRIPT_LIBRARY_RELEASE NAMES QtScript QtScript4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTSCRIPT_LIBRARY_RELEASE NAMES QtScript QtScript4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTSCRIPT_LIBRARY_DEBUG NAMES QtScript_debug QtScriptd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTSCRIPT_LIBRARY_DEBUG NAMES QtScript_debug QtScriptd QtScriptd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
IF ( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
IF ( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
IF ( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED )
# t r y d r o p p i n g a h i n t i f t r y i n g t o u s e V i s u a l S t u d i o w i t h Q t b u i l t b y m i n g w
IF ( QT_LIBRARY_DIR AND MSVC )
IF ( EXISTS ${ QT_LIBRARY_DIR } /libqtmain.a )
MESSAGE ( FATAL_ERROR "It appears you're trying to use Visual Studio with Qt built by mingw" )
ENDIF ( EXISTS ${ QT_LIBRARY_DIR } /libqtmain.a )
ENDIF ( QT_LIBRARY_DIR AND MSVC )
IF ( Qt4_FIND_REQUIRED )
MESSAGE ( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details." )
MESSAGE ( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details." )
ENDIF ( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED )
ENDIF ( Qt4_FIND_REQUIRED )
ENDIF ( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
ENDIF ( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
# S e t Q T _ Q T A S S I S T A N T _ L I B R A R Y
# S e t Q T _ Q T A S S I S T A N T _ L I B R A R Y
@ -771,11 +795,11 @@ IF (QT4_QMAKE_FOUND)
# S e t Q T _ Q T D E S I G N E R _ L I B R A R Y
# S e t Q T _ Q T D E S I G N E R _ L I B R A R Y
FIND_LIBRARY ( QT_QTDESIGNER_LIBRARY_RELEASE NAMES QtDesigner QtDesigner4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTDESIGNER_LIBRARY_RELEASE NAMES QtDesigner QtDesigner4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTDESIGNER_LIBRARY_DEBUG NAMES QtDesigner_debug QtDesignerd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTDESIGNER_LIBRARY_DEBUG NAMES QtDesigner_debug QtDesignerd QtDesignerd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ Q T D E S I G N E R C O M P O N E N T S _ L I B R A R Y
# S e t Q T _ Q T D E S I G N E R C O M P O N E N T S _ L I B R A R Y
FIND_LIBRARY ( QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents QtDesignerComponents4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents QtDesignerComponents4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents_debug QtDesignerComponentsd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents_debug QtDesignerComponentsd QtDesignerComponentsd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ Q T M A I N _ L I B R A R Y
# S e t Q T _ Q T M A I N _ L I B R A R Y
IF ( WIN32 )
IF ( WIN32 )
@ -787,25 +811,29 @@ IF (QT4_QMAKE_FOUND)
# S e t Q T _ Q T A S S I S T A N T C L I E N T _ L I B R A R Y
# S e t Q T _ Q T A S S I S T A N T C L I E N T _ L I B R A R Y
FIND_LIBRARY ( QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient QtAssistantClient4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient QtAssistantClient4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient_debug QtAssistantClientd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient_debug QtAssistantClientd QtAssistantClientd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ Q T H E L P _ L I B R A R Y
# S e t Q T _ Q T H E L P _ L I B R A R Y
FIND_LIBRARY ( QT_QTHELP_LIBRARY_RELEASE NAMES QtHelp QtHelp4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTHELP_LIBRARY_RELEASE NAMES QtHelp QtHelp4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTHELP_LIBRARY_DEBUG NAMES QtHelp_debug QtHelpd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTHELP_LIBRARY_DEBUG NAMES QtHelp_debug QtHelpd QtHelpd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene QtCLucene4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene QtCLucene4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene_debug QtCLucened4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene_debug QtCLucened QtCLucened4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# Q t C L u c e n e n o t w i t h o t h e r f r a m e w o r k s w i t h b i n a r y installation ( in /usr/lib )
IF ( Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE )
FIND_LIBRARY ( QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene PATHS ${ QT_LIBRARY_DIR } )
ENDIF ( Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE )
# S e t Q T _ Q T W E B K I T _ L I B R A R Y
# S e t Q T _ Q T W E B K I T _ L I B R A R Y
FIND_LIBRARY ( QT_QTWEBKIT_LIBRARY_RELEASE NAMES QtWebKit QtWebKit4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTWEBKIT_LIBRARY_RELEASE NAMES QtWebKit QtWebKit4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTWEBKIT_LIBRARY_DEBUG NAMES QtWebKit_debug QtWebKitd4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTWEBKIT_LIBRARY_DEBUG NAMES QtWebKit_debug QtWebKitd QtWebKitd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ Q T X M L P A T T E R N S _ L I B R A R Y
# S e t Q T _ Q T X M L P A T T E R N S _ L I B R A R Y
FIND_LIBRARY ( QT_QTXMLPATTERNS_LIBRARY_RELEASE NAMES QtXmlPatterns QtXmlPatterns4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTXMLPATTERNS_LIBRARY_RELEASE NAMES QtXmlPatterns QtXmlPatterns4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTXMLPATTERNS_LIBRARY_DEBUG NAMES QtXmlPatterns_debug QtXmlPatternsd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_QTXMLPATTERNS_LIBRARY_DEBUG NAMES QtXmlPatterns_debug QtXmlPatternsd QtXmlPatternsd 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# S e t Q T _ P H O N O N _ L I B R A R Y
# S e t Q T _ P H O N O N _ L I B R A R Y
FIND_LIBRARY ( QT_PHONON_LIBRARY_RELEASE NAMES phonon phonon4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_PHONON_LIBRARY_RELEASE NAMES phonon phonon4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_PHONON_LIBRARY_DEBUG NAMES phonon_debug phonond 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
FIND_LIBRARY ( QT_PHONON_LIBRARY_DEBUG NAMES phonon_debug phonond phonond 4 PATHS ${ QT_LIBRARY_DIR } NO_DEFAULT_PATH )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
#
@ -1006,24 +1034,34 @@ IF (QT4_QMAKE_FOUND)
FILE ( RELATIVE_PATH rel ${ CMAKE_CURRENT_SOURCE_DIR } ${ infile } )
FILE ( RELATIVE_PATH rel ${ CMAKE_CURRENT_SOURCE_DIR } ${ infile } )
ENDIF ( CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}" )
ENDIF ( CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}" )
SET ( _outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}" )
SET ( _outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}" )
STRING ( REPLACE ".." "__" _outfile ${ _outfile } )
GET_FILENAME_COMPONENT ( outpath ${ _outfile } PATH )
GET_FILENAME_COMPONENT ( outpath ${ _outfile } PATH )
GET_FILENAME_COMPONENT ( _outfile ${ _outfile } NAME_WE )
GET_FILENAME_COMPONENT ( _outfile ${ _outfile } NAME_WE )
FILE ( MAKE_DIRECTORY ${ outpath } )
FILE ( MAKE_DIRECTORY ${ outpath } )
SET ( ${ outfile } ${ outpath } / ${ prefix } ${ _outfile } . ${ ext } )
SET ( ${ outfile } ${ outpath } / ${ prefix } ${ _outfile } . ${ ext } )
ENDMACRO ( QT4_MAKE_OUTPUT_FILE )
ENDMACRO ( QT4_MAKE_OUTPUT_FILE )
MACRO ( QT4_GET_MOC_ INC_DIRS _moc_INC_DIRS )
MACRO ( QT4_GET_MOC_ FLAGS _moc_flags )
SET ( ${ _moc_ INC_DIRS } )
SET ( ${ _moc_ flags } )
GET_DIRECTORY_PROPERTY ( _inc_DIRS INCLUDE_DIRECTORIES )
GET_DIRECTORY_PROPERTY ( _inc_DIRS INCLUDE_DIRECTORIES )
FOREACH ( _current ${ _inc_DIRS } )
FOREACH ( _current ${ _inc_DIRS } )
SET ( ${ _moc_ INC_DIRS} ${ ${_moc_INC_DIRS } } "-I" ${ _current } )
SET ( ${ _moc_ flags} ${ ${_moc_flags } } "-I${_current}" )
ENDFOREACH ( _current ${ _inc_DIRS } )
ENDFOREACH ( _current ${ _inc_DIRS } )
ENDMACRO ( QT4_GET_MOC_INC_DIRS )
GET_DIRECTORY_PROPERTY ( _defines COMPILE_DEFINITIONS )
FOREACH ( _current ${ _defines } )
SET ( ${ _moc_flags } ${ ${_moc_flags } } "-D${_current}" )
ENDFOREACH ( _current ${ _defines } )
IF ( Q_WS_WIN )
SET ( ${ _moc_flags } ${ ${_moc_flags } } -DWIN32 )
ENDIF ( Q_WS_WIN )
ENDMACRO ( QT4_GET_MOC_FLAGS )
# h e l p e r m a c r o t o s e t u p a m o c r u l e
# h e l p e r m a c r o t o s e t u p a m o c r u l e
MACRO ( QT4_CREATE_MOC_COMMAND infile outfile moc_includes moc_options )
MACRO ( QT4_CREATE_MOC_COMMAND infile outfile moc_ flag s moc_options )
# F o r W i n d o w s , c r e a t e a p a r a m e t e r s f i l e t o w o r k a r o u n d c o m m a n d l i n e l e n g t h l i m i t
# F o r W i n d o w s , c r e a t e a p a r a m e t e r s f i l e t o w o r k a r o u n d c o m m a n d l i n e l e n g t h l i m i t
IF ( WIN32 )
IF ( WIN32 )
# P a s s t h e p a r a m e t e r s i n a f i l e . S e t t h e w o r k i n g d i r e c t o r y t o
# P a s s t h e p a r a m e t e r s i n a f i l e . S e t t h e w o r k i n g d i r e c t o r y t o
@ -1037,7 +1075,7 @@ IF (QT4_QMAKE_FOUND)
SET ( _moc_working_dir WORKING_DIRECTORY ${ _moc_outfile_dir } )
SET ( _moc_working_dir WORKING_DIRECTORY ${ _moc_outfile_dir } )
ENDIF ( _moc_outfile_dir )
ENDIF ( _moc_outfile_dir )
SET ( _moc_parameters_file ${ outfile } _parameters )
SET ( _moc_parameters_file ${ outfile } _parameters )
SET ( _moc_parameters ${ moc_ include s} ${ moc_options } -o "${outfile}" "${infile}" )
SET ( _moc_parameters ${ moc_ flag s} ${ moc_options } -o "${outfile}" "${infile}" )
FILE ( REMOVE ${ _moc_parameters_file } )
FILE ( REMOVE ${ _moc_parameters_file } )
FOREACH ( arg ${ _moc_parameters } )
FOREACH ( arg ${ _moc_parameters } )
FILE ( APPEND ${ _moc_parameters_file } "${arg}\n" )
FILE ( APPEND ${ _moc_parameters_file } "${arg}\n" )
@ -1050,16 +1088,16 @@ IF (QT4_QMAKE_FOUND)
ELSE ( WIN32 )
ELSE ( WIN32 )
ADD_CUSTOM_COMMAND ( OUTPUT ${ outfile }
ADD_CUSTOM_COMMAND ( OUTPUT ${ outfile }
C O M M A N D $ { Q T _ M O C _ E X E C U T A B L E }
C O M M A N D $ { Q T _ M O C _ E X E C U T A B L E }
A R G S $ { m o c _ in c l u d e s } $ { m o c _ o p t i o n s } - o $ { o u t f i l e } $ { i n f i l e }
A R G S $ { m o c _ fl a g s } $ { m o c _ o p t i o n s } - o $ { o u t f i l e } $ { i n f i l e }
D E P E N D S $ { i n f i l e } )
D E P E N D S $ { i n f i l e } )
ENDIF ( WIN32 )
ENDIF ( WIN32 )
ENDMACRO ( QT4_CREATE_MOC_COMMAND )
ENDMACRO ( QT4_CREATE_MOC_COMMAND )
MACRO ( QT4_GENERATE_MOC infile outfile )
MACRO ( QT4_GENERATE_MOC infile outfile )
QT4_GET_MOC_ INC_DIRS( moc_include s)
QT4_GET_MOC_ FLAGS( moc_flag s)
GET_FILENAME_COMPONENT ( abs_infile ${ infile } ABSOLUTE )
GET_FILENAME_COMPONENT ( abs_infile ${ infile } ABSOLUTE )
QT4_CREATE_MOC_COMMAND ( ${ abs_infile } ${ outfile } "${moc_ include s}" "" )
QT4_CREATE_MOC_COMMAND ( ${ abs_infile } ${ outfile } "${moc_ flag s}" "" )
SET_SOURCE_FILES_PROPERTIES ( ${ outfile } PROPERTIES SKIP_AUTOMOC TRUE ) # d o n t r u n a u t o m o c o n t h i s f i l e
SET_SOURCE_FILES_PROPERTIES ( ${ outfile } PROPERTIES SKIP_AUTOMOC TRUE ) # d o n t r u n a u t o m o c o n t h i s f i l e
ENDMACRO ( QT4_GENERATE_MOC )
ENDMACRO ( QT4_GENERATE_MOC )
@ -1068,13 +1106,13 @@ IF (QT4_QMAKE_FOUND)
MACRO ( QT4_WRAP_CPP outfiles )
MACRO ( QT4_WRAP_CPP outfiles )
# g e t i n c l u d e d i r s
# g e t i n c l u d e d i r s
QT4_GET_MOC_ INC_DIRS( moc_include s)
QT4_GET_MOC_ FLAGS( moc_flag s)
QT4_EXTRACT_OPTIONS ( moc_files moc_options ${ ARGN } )
QT4_EXTRACT_OPTIONS ( moc_files moc_options ${ ARGN } )
FOREACH ( it ${ moc_files } )
FOREACH ( it ${ moc_files } )
GET_FILENAME_COMPONENT ( it ${ it } ABSOLUTE )
GET_FILENAME_COMPONENT ( it ${ it } ABSOLUTE )
QT4_MAKE_OUTPUT_FILE ( ${ it } moc_ cxx outfile )
QT4_MAKE_OUTPUT_FILE ( ${ it } moc_ cxx outfile )
QT4_CREATE_MOC_COMMAND ( ${ it } ${ outfile } "${moc_ include s}" "${moc_options}" )
QT4_CREATE_MOC_COMMAND ( ${ it } ${ outfile } "${moc_ flag s}" "${moc_options}" )
SET ( ${ outfiles } ${ ${outfiles } } ${ outfile } )
SET ( ${ outfiles } ${ ${outfiles } } ${ outfile } )
ENDFOREACH ( it )
ENDFOREACH ( it )
@ -1218,7 +1256,7 @@ IF (QT4_QMAKE_FOUND)
ENDMACRO ( QT4_ADD_DBUS_ADAPTOR )
ENDMACRO ( QT4_ADD_DBUS_ADAPTOR )
MACRO ( QT4_AUTOMOC )
MACRO ( QT4_AUTOMOC )
QT4_GET_MOC_ INC_DIR S( _moc_INCS )
QT4_GET_MOC_ FLAG S( _moc_INCS )
SET ( _matching_FILES )
SET ( _matching_FILES )
FOREACH ( _current_FILE ${ ARGN } )
FOREACH ( _current_FILE ${ ARGN } )
@ -1255,9 +1293,12 @@ IF (QT4_QMAKE_FOUND)
ENDMACRO ( QT4_AUTOMOC )
ENDMACRO ( QT4_AUTOMOC )
MACRO ( QT4_CREATE_TRANSLATION _qm_files )
MACRO ( QT4_CREATE_TRANSLATION _qm_files )
QT4_EXTRACT_OPTIONS ( _lupdate_files _lupdate_options ${ ARGN } )
MESSAGE ( "lupdate_files ${_lupdate_files}" )
MESSAGE ( "lupdate_options ${_lupdate_options}" )
SET ( _my_sources )
SET ( _my_sources )
SET ( _my_tsfiles )
SET ( _my_tsfiles )
FOREACH ( _file ${ ARGN } )
FOREACH ( _file ${ _lupdate_files } )
GET_FILENAME_COMPONENT ( _ext ${ _file } EXT )
GET_FILENAME_COMPONENT ( _ext ${ _file } EXT )
GET_FILENAME_COMPONENT ( _abs_FILE ${ _file } ABSOLUTE )
GET_FILENAME_COMPONENT ( _abs_FILE ${ _file } ABSOLUTE )
IF ( _ext MATCHES "ts" )
IF ( _ext MATCHES "ts" )
@ -1269,7 +1310,7 @@ IF (QT4_QMAKE_FOUND)
FOREACH ( _ts_file ${ _my_tsfiles } )
FOREACH ( _ts_file ${ _my_tsfiles } )
ADD_CUSTOM_COMMAND ( OUTPUT ${ _ts_file }
ADD_CUSTOM_COMMAND ( OUTPUT ${ _ts_file }
C O M M A N D $ { Q T _ L U P D A T E _ E X E C U T A B L E }
C O M M A N D $ { Q T _ L U P D A T E _ E X E C U T A B L E }
A R G S $ { _ my _ s o u r c e s } - t s $ { _ t s _ f i l e }
A R G S $ { _ lu p d a t e _ o p t i o n s } $ { _ my _ s o u r c e s } - t s $ { _ t s _ f i l e }
D E P E N D S $ { _ m y _ s o u r c e s } )
D E P E N D S $ { _ m y _ s o u r c e s } )
ENDFOREACH ( _ts_file )
ENDFOREACH ( _ts_file )
QT4_ADD_TRANSLATION ( ${ _qm_files } ${ _my_tsfiles } )
QT4_ADD_TRANSLATION ( ${ _qm_files } ${ _my_tsfiles } )
@ -1301,18 +1342,22 @@ IF (QT4_QMAKE_FOUND)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# i f t h e i n c l u d e s , l i b r a r i e s , m o c , u i c a n d r c c a r e f o u n d t h e n w e h a v e i t
# i f t h e i n c l u d e s , l i b r a r i e s , m o c , u i c a n d r c c a r e f o u n d t h e n w e h a v e i t
IF ( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE )
IF ( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND
Q T _ U I C _ E X E C U T A B L E A N D Q T _ R C C _ E X E C U T A B L E A N D Q T _ Q T C O R E _ L I B R A R Y )
SET ( QT4_FOUND "YES" )
SET ( QT4_FOUND "YES" )
INCLUDE ( FindPackageMessage )
INCLUDE ( FindPackageMessage )
FIND_PACKAGE_MESSAGE ( Qt4 "Found Qt-Version ${QTVERSION}"
FIND_PACKAGE_MESSAGE ( Qt4 "Found Qt-Version ${QTVERSION}"
" [ $ { Q T _ L I B R A R Y _ D I R } ] [ $ { Q T _ I N C L U D E _ D I R } ] [ $ { Q T _ M O C _ E X E C U T A B L E } ] [ $ { Q T _ U I C _ E X E C U T A B L E } ] [ $ { Q T _ R C C _ E X E C U T A B L E } ] " )
" [ $ { Q T _ L I B R A R Y _ D I R } ] [ $ { Q T _ I N C L U D E _ D I R } ] [ $ { Q T _ M O C _ E X E C U T A B L E } ] [ $ { Q T _ U I C _ E X E C U T A B L E } ] [ $ { Q T _ R C C _ E X E C U T A B L E } ] " )
ELSE ( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE )
ELSE ( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND
Q T _ U I C _ E X E C U T A B L E A N D Q T _ R C C _ E X E C U T A B L E A N D Q T _ Q T C O R E _ L I B R A R Y )
SET ( QT4_FOUND "NO" )
SET ( QT4_FOUND "NO" )
SET ( QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE )
SET ( QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE )
IF ( Qt4_FIND_REQUIRED )
IF ( Qt4_FIND_REQUIRED )
MESSAGE ( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!" )
MESSAGE ( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!" )
ENDIF ( Qt4_FIND_REQUIRED )
ENDIF ( Qt4_FIND_REQUIRED )
ENDIF ( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE )
ENDIF ( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND
Q T _ U I C _ E X E C U T A B L E A N D Q T _ R C C _ E X E C U T A B L E A N D Q T _ Q T C O R E _ L I B R A R Y )
SET ( QT_FOUND ${ QT4_FOUND } )
SET ( QT_FOUND ${ QT4_FOUND } )
@ -1323,9 +1368,9 @@ IF (QT4_QMAKE_FOUND)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
IF ( EXISTS "${QT_MKSPECS_DIR}/qconfig.pri" )
IF ( EXISTS "${QT_MKSPECS_DIR}/qconfig.pri" )
FILE ( READ ${ QT_MKSPECS_DIR } /qconfig.pri _qconfig_FILE_contents )
FILE ( READ ${ QT_MKSPECS_DIR } /qconfig.pri _qconfig_FILE_contents )
STRING ( REGEX MATCH "QT_CONFIG[^\n]+" QT_QCONFIG ${ _qconfig_FILE_contents } )
STRING ( REGEX MATCH "QT_CONFIG[^\n]+" QT_QCONFIG "${_qconfig_FILE_contents}" )
STRING ( REGEX MATCH "CONFIG[^\n]+" QT_CONFIG ${ _qconfig_FILE_contents } )
STRING ( REGEX MATCH "CONFIG[^\n]+" QT_CONFIG "${_qconfig_FILE_contents}" )
STRING ( REGEX MATCH "EDITION[^\n]+" QT_EDITION ${ _qconfig_FILE_contents } )
STRING ( REGEX MATCH "EDITION[^\n]+" QT_EDITION "${_qconfig_FILE_contents}" )
ENDIF ( EXISTS "${QT_MKSPECS_DIR}/qconfig.pri" )
ENDIF ( EXISTS "${QT_MKSPECS_DIR}/qconfig.pri" )
IF ( "${QT_EDITION}" MATCHES "DesktopLight" )
IF ( "${QT_EDITION}" MATCHES "DesktopLight" )
SET ( QT_EDITION_DESKTOPLIGHT 1 )
SET ( QT_EDITION_DESKTOPLIGHT 1 )
@ -1338,6 +1383,13 @@ IF (QT4_QMAKE_FOUND)
#
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# f i n d d e p e n d e n c i e s f o r s o m e Q t m o d u l e s
# w h e n d o i n g b u i l d s a g a i n s t a s t a t i c Q t , t h e y a r e r e q u i r e d
# w h e n d o i n g b u i l d s a g a i n s t a s h a r e d Q t , t h e y a r e s o m e t i m e s n o t r e q u i r e d
# e v e n s o m e L i n u x d i s t r o s d o n o t r e q u i r e t h e s e d e p e n d e n c i e s
# i f a u s e r n e e d s t h e d e p e n d e n c i e s , a n d t h e y c o u l d n ' t b e f o u n d , t h e y c a n s e t
# t h e v a r i a b l e s t h e m s e l v e s .
SET ( QT_QTGUI_LIB_DEPENDENCIES "" )
SET ( QT_QTGUI_LIB_DEPENDENCIES "" )
SET ( QT_QTCORE_LIB_DEPENDENCIES "" )
SET ( QT_QTCORE_LIB_DEPENDENCIES "" )
SET ( QT_QTNETWORK_LIB_DEPENDENCIES "" )
SET ( QT_QTNETWORK_LIB_DEPENDENCIES "" )
@ -1359,8 +1411,10 @@ IF (QT4_QMAKE_FOUND)
# # s y s t e m p n g
# # s y s t e m p n g
IF ( QT_QCONFIG MATCHES "system-png" )
IF ( QT_QCONFIG MATCHES "system-png" )
FIND_LIBRARY ( QT_PNG_LIBRARY NAMES png )
FIND_LIBRARY ( QT_PNG_LIBRARY NAMES png )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_PNG_LIBRARY } )
MARK_AS_ADVANCED ( QT_PNG_LIBRARY )
MARK_AS_ADVANCED ( QT_PNG_LIBRARY )
IF ( QT_PNG_LIBRARY )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_PNG_LIBRARY } )
ENDIF ( QT_PNG_LIBRARY )
ENDIF ( QT_QCONFIG MATCHES "system-png" )
ENDIF ( QT_QCONFIG MATCHES "system-png" )
# f o r X 1 1 , g e t X 1 1 l i b r a r y d i r e c t o r y
# f o r X 1 1 , g e t X 1 1 l i b r a r y d i r e c t o r y
@ -1373,78 +1427,100 @@ IF (QT4_QMAKE_FOUND)
# a s k q m a k e w h e r e t h e x 1 1 l i b s a r e
# a s k q m a k e w h e r e t h e x 1 1 l i b s a r e
FIND_LIBRARY ( QT_X11_SM_LIBRARY NAMES SM PATHS ${ QMAKE_LIBDIR_X11 } )
FIND_LIBRARY ( QT_X11_SM_LIBRARY NAMES SM PATHS ${ QMAKE_LIBDIR_X11 } )
FIND_LIBRARY ( QT_X11_ICE_LIBRARY NAMES ICE PATHS ${ QMAKE_LIBDIR_X11 } )
FIND_LIBRARY ( QT_X11_ICE_LIBRARY NAMES ICE PATHS ${ QMAKE_LIBDIR_X11 } )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_X11_SM_LIBRARY } ${ QT_X11_ICE_LIBRARY } )
MARK_AS_ADVANCED ( QT_X11_SM_LIBRARY )
MARK_AS_ADVANCED ( QT_X11_SM_LIBRARY )
MARK_AS_ADVANCED ( QT_X11_ICE_LIBRARY )
MARK_AS_ADVANCED ( QT_X11_ICE_LIBRARY )
IF ( QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_X11_SM_LIBRARY } ${ QT_X11_ICE_LIBRARY } )
ENDIF ( QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY )
ENDIF ( QT_QCONFIG MATCHES "x11sm" )
ENDIF ( QT_QCONFIG MATCHES "x11sm" )
# # X i
# # X i
IF ( QT_QCONFIG MATCHES "tablet" )
IF ( QT_QCONFIG MATCHES "tablet" )
FIND_LIBRARY ( QT_XI_LIBRARY NAMES Xi PATHS ${ QMAKE_LIBDIR_X11 } )
FIND_LIBRARY ( QT_XI_LIBRARY NAMES Xi PATHS ${ QMAKE_LIBDIR_X11 } )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_XI_LIBRARY } )
MARK_AS_ADVANCED ( QT_XI_LIBRARY )
MARK_AS_ADVANCED ( QT_XI_LIBRARY )
IF ( QT_XI_LIBRARY )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_XI_LIBRARY } )
ENDIF ( QT_XI_LIBRARY )
ENDIF ( QT_QCONFIG MATCHES "tablet" )
ENDIF ( QT_QCONFIG MATCHES "tablet" )
# # X r e n d e r
# # X r e n d e r
IF ( QT_QCONFIG MATCHES "xrender" )
IF ( QT_QCONFIG MATCHES "xrender" )
FIND_LIBRARY ( QT_XRENDER_LIBRARY NAMES Xrender PATHS ${ QMAKE_LIBDIR_X11 } )
FIND_LIBRARY ( QT_XRENDER_LIBRARY NAMES Xrender PATHS ${ QMAKE_LIBDIR_X11 } )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_XRENDER_LIBRARY } )
MARK_AS_ADVANCED ( QT_XRENDER_LIBRARY )
MARK_AS_ADVANCED ( QT_XRENDER_LIBRARY )
IF ( QT_XRENDER_LIBRARY )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_XRENDER_LIBRARY } )
ENDIF ( QT_XRENDER_LIBRARY )
ENDIF ( QT_QCONFIG MATCHES "xrender" )
ENDIF ( QT_QCONFIG MATCHES "xrender" )
# # X r a n d r
# # X r a n d r
IF ( QT_QCONFIG MATCHES "xrandr" )
IF ( QT_QCONFIG MATCHES "xrandr" )
FIND_LIBRARY ( QT_XRANDR_LIBRARY NAMES Xrandr PATHS ${ QMAKE_LIBDIR_X11 } )
FIND_LIBRARY ( QT_XRANDR_LIBRARY NAMES Xrandr PATHS ${ QMAKE_LIBDIR_X11 } )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_XRANDR_LIBRARY } )
MARK_AS_ADVANCED ( QT_XRANDR_LIBRARY )
MARK_AS_ADVANCED ( QT_XRANDR_LIBRARY )
IF ( QT_XRANDR_LIBRARY )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_XRANDR_LIBRARY } )
ENDIF ( QT_XRANDR_LIBRARY )
ENDIF ( QT_QCONFIG MATCHES "xrandr" )
ENDIF ( QT_QCONFIG MATCHES "xrandr" )
# # X c u r s o r
# # X c u r s o r
IF ( QT_QCONFIG MATCHES "xcursor" )
IF ( QT_QCONFIG MATCHES "xcursor" )
FIND_LIBRARY ( QT_XCURSOR_LIBRARY NAMES Xcursor PATHS ${ QMAKE_LIBDIR_X11 } )
FIND_LIBRARY ( QT_XCURSOR_LIBRARY NAMES Xcursor PATHS ${ QMAKE_LIBDIR_X11 } )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_XCURSOR_LIBRARY } )
MARK_AS_ADVANCED ( QT_XCURSOR_LIBRARY )
MARK_AS_ADVANCED ( QT_XCURSOR_LIBRARY )
IF ( QT_XCURSOR_LIBRARY )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_XCURSOR_LIBRARY } )
ENDIF ( QT_XCURSOR_LIBRARY )
ENDIF ( QT_QCONFIG MATCHES "xcursor" )
ENDIF ( QT_QCONFIG MATCHES "xcursor" )
# # X i n e r a m a
# # X i n e r a m a
IF ( QT_QCONFIG MATCHES "xinerama" )
IF ( QT_QCONFIG MATCHES "xinerama" )
FIND_LIBRARY ( QT_XINERAMA_LIBRARY NAMES Xinerama PATHS ${ QMAKE_LIBDIR_X11 } )
FIND_LIBRARY ( QT_XINERAMA_LIBRARY NAMES Xinerama PATHS ${ QMAKE_LIBDIR_X11 } )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_XINERAMA_LIBRARY } )
MARK_AS_ADVANCED ( QT_XINERAMA_LIBRARY )
MARK_AS_ADVANCED ( QT_XINERAMA_LIBRARY )
IF ( QT_XINERAMA_LIBRARY )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_XINERAMA_LIBRARY } )
ENDIF ( QT_XINERAMA_LIBRARY )
ENDIF ( QT_QCONFIG MATCHES "xinerama" )
ENDIF ( QT_QCONFIG MATCHES "xinerama" )
# # X f i x e s
# # X f i x e s
IF ( QT_QCONFIG MATCHES "xfixes" )
IF ( QT_QCONFIG MATCHES "xfixes" )
FIND_LIBRARY ( QT_XFIXES_LIBRARY NAMES Xfixes PATHS ${ QMAKE_LIBDIR_X11 } )
FIND_LIBRARY ( QT_XFIXES_LIBRARY NAMES Xfixes PATHS ${ QMAKE_LIBDIR_X11 } )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_XFIXES_LIBRARY } )
MARK_AS_ADVANCED ( QT_XFIXES_LIBRARY )
MARK_AS_ADVANCED ( QT_XFIXES_LIBRARY )
IF ( QT_XFIXES_LIBRARY )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_XFIXES_LIBRARY } )
ENDIF ( QT_XFIXES_LIBRARY )
ENDIF ( QT_QCONFIG MATCHES "xfixes" )
ENDIF ( QT_QCONFIG MATCHES "xfixes" )
# # s y s t e m - f r e e t y p e
# # s y s t e m - f r e e t y p e
IF ( QT_QCONFIG MATCHES "system-freetype" )
IF ( QT_QCONFIG MATCHES "system-freetype" )
FIND_LIBRARY ( QT_FREETYPE_LIBRARY NAMES freetype )
FIND_LIBRARY ( QT_FREETYPE_LIBRARY NAMES freetype )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_FREETYPE_LIBRARY } )
MARK_AS_ADVANCED ( QT_FREETYPE_LIBRARY )
MARK_AS_ADVANCED ( QT_FREETYPE_LIBRARY )
IF ( QT_FREETYPE_LIBRARY )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_FREETYPE_LIBRARY } )
ENDIF ( QT_FREETYPE_LIBRARY )
ENDIF ( QT_QCONFIG MATCHES "system-freetype" )
ENDIF ( QT_QCONFIG MATCHES "system-freetype" )
# # f o n t c o n f i g
# # f o n t c o n f i g
IF ( QT_QCONFIG MATCHES "fontconfig" )
IF ( QT_QCONFIG MATCHES "fontconfig" )
FIND_LIBRARY ( QT_FONTCONFIG_LIBRARY NAMES fontconfig )
FIND_LIBRARY ( QT_FONTCONFIG_LIBRARY NAMES fontconfig )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_FONTCONFIG_LIBRARY } )
MARK_AS_ADVANCED ( QT_FONTCONFIG_LIBRARY )
MARK_AS_ADVANCED ( QT_FONTCONFIG_LIBRARY )
IF ( QT_FONTCONFIG_LIBRARY )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ QT_FONTCONFIG_LIBRARY } )
ENDIF ( QT_FONTCONFIG_LIBRARY )
ENDIF ( QT_QCONFIG MATCHES "fontconfig" )
ENDIF ( QT_QCONFIG MATCHES "fontconfig" )
# # s y s t e m - z l i b
# # s y s t e m - z l i b
IF ( QT_QCONFIG MATCHES "system-zlib" )
IF ( QT_QCONFIG MATCHES "system-zlib" )
FIND_LIBRARY ( QT_ZLIB_LIBRARY NAMES z )
FIND_LIBRARY ( QT_ZLIB_LIBRARY NAMES z )
SET ( QT_QTCORE_LIB_DEPENDENCIES ${ QT_QTCORE_LIB_DEPENDENCIES } ${ QT_ZLIB_LIBRARY } )
MARK_AS_ADVANCED ( QT_ZLIB_LIBRARY )
MARK_AS_ADVANCED ( QT_ZLIB_LIBRARY )
IF ( QT_ZLIB_LIBRARY )
SET ( QT_QTCORE_LIB_DEPENDENCIES ${ QT_QTCORE_LIB_DEPENDENCIES } ${ QT_ZLIB_LIBRARY } )
ENDIF ( QT_ZLIB_LIBRARY )
ENDIF ( QT_QCONFIG MATCHES "system-zlib" )
ENDIF ( QT_QCONFIG MATCHES "system-zlib" )
# # o p e n s s l
# # o p e n s s l
IF ( QT_QCONFIG MATCHES "openssl" AND NOT Q_WS_WIN )
IF ( QT_QCONFIG MATCHES "openssl" AND NOT Q_WS_WIN )
FIND_PACKAGE ( OpenSSL )
FIND_PACKAGE ( OpenSSL )
IF ( OPENSSL_LIBRARIES )
SET ( QT_QTNETWORK_LIB_DEPENDENCIES ${ QT_QTNETWORK_LIB_DEPENDENCIES } ${ OPENSSL_LIBRARIES } )
SET ( QT_QTNETWORK_LIB_DEPENDENCIES ${ QT_QTNETWORK_LIB_DEPENDENCIES } ${ OPENSSL_LIBRARIES } )
ENDIF ( OPENSSL_LIBRARIES )
ENDIF ( QT_QCONFIG MATCHES "openssl" AND NOT Q_WS_WIN )
ENDIF ( QT_QCONFIG MATCHES "openssl" AND NOT Q_WS_WIN )
# # q d b u s
# # q d b u s
@ -1517,8 +1593,10 @@ IF (QT4_QMAKE_FOUND)
SET ( CMAKE_REQUIRED_LIBRARIES ${ CMAKE_REQUIRED_LIBRARIES_SAVE } )
SET ( CMAKE_REQUIRED_LIBRARIES ${ CMAKE_REQUIRED_LIBRARIES_SAVE } )
IF ( QT_POSIX_TIMERS )
IF ( QT_POSIX_TIMERS )
FIND_LIBRARY ( QT_RT_LIBRARY NAMES rt )
FIND_LIBRARY ( QT_RT_LIBRARY NAMES rt )
SET ( QT_QTCORE_LIB_DEPENDENCIES ${ QT_QTCORE_LIB_DEPENDENCIES } ${ QT_RT_LIBRARY } )
MARK_AS_ADVANCED ( QT_RT_LIBRARY )
MARK_AS_ADVANCED ( QT_RT_LIBRARY )
IF ( QT_RT_LIBRARY )
SET ( QT_QTCORE_LIB_DEPENDENCIES ${ QT_QTCORE_LIB_DEPENDENCIES } ${ QT_RT_LIBRARY } )
ENDIF ( QT_RT_LIBRARY )
ENDIF ( QT_POSIX_TIMERS )
ENDIF ( QT_POSIX_TIMERS )
ENDIF ( QT_QCONFIG MATCHES "clock-monotonic" )
ENDIF ( QT_QCONFIG MATCHES "clock-monotonic" )
@ -1530,8 +1608,10 @@ IF (QT4_QMAKE_FOUND)
STRING ( REGEX REPLACE "-l" "" QT_X11_LIB "${QT_X11_LIB}" )
STRING ( REGEX REPLACE "-l" "" QT_X11_LIB "${QT_X11_LIB}" )
SET ( QT_TMP_STR "QT_X11_${QT_X11_LIB}_LIBRARY" )
SET ( QT_TMP_STR "QT_X11_${QT_X11_LIB}_LIBRARY" )
FIND_LIBRARY ( ${ QT_TMP_STR } NAMES "${QT_X11_LIB}" PATHS ${ QMAKE_LIBDIR_X11 } )
FIND_LIBRARY ( ${ QT_TMP_STR } NAMES "${QT_X11_LIB}" PATHS ${ QMAKE_LIBDIR_X11 } )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ ${QT_TMP_STR } } )
MARK_AS_ADVANCED ( ${ QT_TMP_STR } )
MARK_AS_ADVANCED ( ${ QT_TMP_STR } )
IF ( ${ QT_TMP_STR } )
SET ( QT_QTGUI_LIB_DEPENDENCIES ${ QT_QTGUI_LIB_DEPENDENCIES } ${ ${QT_TMP_STR } } )
ENDIF ( ${ QT_TMP_STR } )
ENDFOREACH ( QT_X11_LIB )
ENDFOREACH ( QT_X11_LIB )
QT_QUERY_QMAKE ( QT_LIBS_THREAD "QMAKE_LIBS_THREAD" )
QT_QUERY_QMAKE ( QT_LIBS_THREAD "QMAKE_LIBS_THREAD" )