diff --git a/v2/tools/qt4.jam b/v2/tools/qt4.jam index 4b5a2888d..eb35658b1 100644 --- a/v2/tools/qt4.jam +++ b/v2/tools/qt4.jam @@ -83,186 +83,216 @@ rule init ( prefix ) # Generates .cpp file from qrc file generators.register-standard qt4.rcc : QRC : CPP(qrc_%) ; - local usage-requirements = - $(.prefix)/include - $(.prefix)/lib - $(.prefix)/lib - multi ; - - local suffix ; - if [ os.name ] = NT + # Test for a buildable Qt. + if [ glob $(.prefix)/Jamroot ] { - # On NT, the libs have "4" suffix, and "d" suffix in debug builds - # Also, on NT we must link against qtmain library (for WinMain) - suffix_version = "4" ; - suffix_debug = "d" ; - lib qtmain : : qtmain$(suffix_debug) debug ; - lib qtmain : : qtmain release ; - main = qtmain ; - } - else - { - # On X11, debug versions of libs have "_debug" suffix - suffix_version = "" ; - suffix_debug = "_debug" ; + # Import all Qt Modules + local all-libraries = QtCore QtGui QtNetwork QtXml QtSql QtSvg Qt3Support QtTest QtAssistantClient QtUiTools ; + for local l in $(all-libraries) + { + alias $(l) : $(.prefix)//$(l) ; + explicit $(l) ; + } + } + else + # Use pre-built Qt + { + local usage-requirements = + $(.prefix)/include + $(.prefix)/lib + $(.prefix)/lib + multi ; + + local suffix ; + if [ os.name ] = NT + { + # On NT, the libs have "4" suffix, and "d" suffix in debug builds + # Also, on NT we must link against qtmain library (for WinMain) + suffix_version = "4" ; + suffix_debug = "d" ; + lib qtmain : : qtmain$(suffix_debug) debug ; + lib qtmain : : qtmain release ; + main = qtmain ; + } + else + { + # On X11, debug versions of libs have "_debug" suffix + suffix_version = "" ; + suffix_debug = "_debug" ; + } + + lib QtCore : $(main) + : QtCore$(suffix_version) release + : + : # usage-requirements + QT_CORE_LIB + QT_NO_DEBUG + $(.prefix)/include/QtCore + $(usage-requirements) + ; + lib QtCore : $(main) + : QtCore$(suffix_debug)$(suffix_version) debug + : + : # usage-requirements + QT_CORE_LIB + $(.prefix)/include/QtCore + $(usage-requirements) + ; + + lib QtGui : QtCore + : QtGui$(suffix_version) release + : + : # usage-requirements + QT_GUI_LIB + $(.prefix)/include/QtGui + gui + ; + + lib QtGui : QtCore + : QtGui$(suffix_debug)$(suffix_version) debug + : + : # usage-requirements + QT_GUI_LIB + $(.prefix)/include/QtGui + gui + ; + + lib QtNetwork : QtCore + : QtNetwork$(suffix_version) release + : + : # usage-requirements + QT_NETWORK_LIB + $(.prefix)/include/QtNetwork + ; + lib QtNetwork : QtCore + : QtNetwork$(suffix_debug)$(suffix_version) debug + : + : # usage-requirements + QT_NETWORK_LIB + $(.prefix)/include/QtNetwork + ; + + lib QtSql : QtCore + : QtSql$(suffix_version) release + : + : # usage-requirements + QT_SQL_LIB + $(.prefix)/include/QtSql + ; + lib QtSql : QtCore + : QtSql$(suffix_debug)$(suffix_version) debug + : + : # usage-requirements + QT_SQL_LIB + $(.prefix)/include/QtSql + ; + + lib QtXml : QtCore + : QtXml$(suffix_version) release + : + : # usage-requirements + QT_XML_LIB + $(.prefix)/include/QtXml + ; + lib QtXml : QtCore + : QtXml$(suffix_debug)$(suffix_version) debug + : + : # usage-requirements + QT_XML_LIB + $(.prefix)/include/QtXml + ; + + lib Qt3Support : QtGui QtNetwork QtXml QSql + : Qt3Support$(suffix_version) release + : + : # usage-requirements + QT_QT3SUPPORT_LIB + QT3_SUPPORT + $(.prefix)/include/Qt3Support + ; + lib Qt3Support : QtGui QtNetwork QtXml QSql + : Qt3Support$(suffix_debug)$(suffix_version) debug + : + : # usage-requirements + QT_QT3SUPPORT_LIB + QT3_SUPPORT + $(.prefix)/include/Qt3Support + ; + + # OpenGl Support + lib QtOpenGL : QtGui + : QtOpenGL$(suffix_version) release + : + : # usage-requirements + QT_OPENGL_LIB + $(.prefix)/include/QtOpenGL + ; + lib QtOpenGL : QtGui + : QtOpenGL$(suffix_debug)$(suffix_version) debug + : + : # usage-requirements + QT_OPENGL_LIB + $(.prefix)/include/QtOpenGL + ; + + # SVG-Support (Qt 4.1) + lib QtSvg : QtXml QtOpenGL + : QtSvg$(suffix_version) release + : + : # usage-requirements + QT_SVG_LIB + $(.prefix)/include/QtSvg + ; + lib QtSvg : QtXml QtOpenGL + : QtSvg$(suffix_debug)$(suffix_version) debug + : + : # usage-requirements + QT_SVG_LIB + $(.prefix)/include/QtSvg + ; + + # Test-Support (Qt 4.1) + lib QtTest : QtCore + : QtTest$(suffix_version) release + : + : # usage-requirements + $(.prefix)/include/QtTest + ; + lib QtTest : QtCore + : QtTest$(suffix_debug)$(suffix_version) debug + : + : # usage-requirements + $(.prefix)/include/QtTest + ; + + # AssistantClient Support + lib QtAssistantClient : QtGui + : QtAssistantClient$(suffix_version) release + : + : # usage-requirements + $(.prefix)/include/QtAssistantClient + ; + lib QtAssistantClient : QtGui + : QtAssistantClient$(suffix_debug)$(suffix_version) debug + : + : # usage-requirements + $(.prefix)/include/QtAssistantClient + ; + + # Support for dynamic Widgets (Qt 4.1) + lib QtUiTools : QtGui QtXml + : QtUiTools$(suffix_version) release + : + : # usage-requirements + $(.prefix)/include/QtUiTools + ; + lib QtUiTools : QtGui QtXml + : QtUiTools$(suffix_debug)$(suffix_version) debug + : + : # usage-requirements + $(.prefix)/include/QtUiTools + ; } - - lib QtCore : $(main) - : QtCore$(suffix_version) release - : - : # usage-requirements - QT_CORE_LIB - $(.prefix)/include/QtCore - $(usage-requirements) - ; - lib QtCore : $(main) - : QtCore$(suffix_debug)$(suffix_version) debug - : - : # usage-requirements - QT_CORE_LIB - $(.prefix)/include/QtCore - $(usage-requirements) - ; - - lib QtGui : QtCore - : QtGui$(suffix_version) release - : - : # usage-requirements - QT_GUI_LIB - $(.prefix)/include/QtGui - gui - ; - - lib QtGui : QtCore - : QtGui$(suffix_debug)$(suffix_version) debug - : - : # usage-requirements - QT_GUI_LIB - $(.prefix)/include/QtGui - gui - ; - - lib QtNetwork : QtCore - : QtNetwork$(suffix_version) release - : - : # usage-requirements - QT_NETWORK_LIB - $(.prefix)/include/QtNetwork - ; - lib QtNetwork : QtCore - : QtNetwork$(suffix_debug)$(suffix_version) debug - : - : # usage-requirements - QT_NETWORK_LIB - $(.prefix)/include/QtNetwork - ; - - lib QtSql : QtCore - : QtSql$(suffix_version) release - : - : # usage-requirements - QT_SQL_LIB - $(.prefix)/include/QtSql - ; - lib QtSql : QtCore - : QtSql$(suffix_debug)$(suffix_version) debug - : - : # usage-requirements - QT_SQL_LIB - $(.prefix)/include/QtSql - ; - - lib QtXml : QtCore - : QtXml$(suffix_version) release - : - : # usage-requirements - QT_XML_LIB - $(.prefix)/include/QtXml - ; - lib QtXml : QtCore - : QtXml$(suffix_debug)$(suffix_version) debug - : - : # usage-requirements - QT_XML_LIB - $(.prefix)/include/QtXml - ; - - lib Qt3Support : QtGui QtNetwork QtXml QSql - : Qt3Support$(suffix_version) release - : - : # usage-requirements - QT_QT3SUPPORT_LIB - QT3_SUPPORT - $(.prefix)/include/Qt3Support - ; - lib Qt3Support : QtGui QtNetwork QtXml QSql - : Qt3Support$(suffix_debug)$(suffix_version) debug - : - : # usage-requirements - QT_QT3SUPPORT_LIB - QT3_SUPPORT - $(.prefix)/include/Qt3Support - ; - - # OpenGl Support - lib QtOpenGL : QtGui - : QtOpenGL$(suffix_version) release - : - : # usage-requirements - QT_OPENGL_LIB - $(.prefix)/include/QtOpenGL - ; - lib QtOpenGL : QtGui - : QtOpenGL$(suffix_debug)$(suffix_version) debug - : - : # usage-requirements - QT_OPENGL_LIB - $(.prefix)/include/QtOpenGL - ; - - # SVG-Support (Qt 4.1) - lib QtSvg : QtXml QtOpenGL - : QtSvg$(suffix_version) release - : - : # usage-requirements - QT_SVG_LIB - $(.prefix)/include/QtSvg - ; - lib QtSvg : QtXml QtOpenGL - : QtSvg$(suffix_debug)$(suffix_version) debug - : - : # usage-requirements - QT_SVG_LIB - $(.prefix)/include/QtSvg - ; - - # Test-Support (Qt 4.1) - lib QtTest : QtCore - : QtTest$(suffix_version) release - : - : # usage-requirements - $(.prefix)/include/QtTest - ; - lib QtTest : QtCore - : QtTest$(suffix_debug)$(suffix_version) debug - : - : # usage-requirements - $(.prefix)/include/QtTest - ; - - # AssistantClient Support - lib QtAssistantClient : QtGui - : QtAssistantClient$(suffix_version) release - : - : # usage-requirements - $(.prefix)/include/QtAssistantClient - ; - lib QtAssistantClient : QtGui - : QtAssistantClient$(suffix_debug)$(suffix_version) debug - : - : # usage-requirements - $(.prefix)/include/QtAssistantClient - ; } }