diff options
author | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-03-27 21:56:52 +0000 |
---|---|---|
committer | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-03-27 21:56:52 +0000 |
commit | e70558cf0adab0c4395abaa9d147fd5c5d9eacc8 (patch) | |
tree | ff9a4e7dec28e428ecc1415cfb59f96f337cdbba | |
parent | be540072adcf609548f7f72ad17a47c6c6899276 (diff) | |
download | tqtinterface-e70558cf0adab0c4395abaa9d147fd5c5d9eacc8.tar.gz tqtinterface-e70558cf0adab0c4395abaa9d147fd5c5d9eacc8.zip |
[cmake] reworked tqtinterface build system
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1226235 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r-- | CMakeLists.txt | 755 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 182 | ||||
-rw-r--r-- | qtinterface/CMakeLists.txt | 195 | ||||
-rw-r--r-- | qtinterface/TQt.pc.cmake | 9 | ||||
-rwxr-xr-x | qtinterface/tmoc.cmake | 2 | ||||
-rwxr-xr-x | qtinterface/tqt-replace-stream.cmake | 6 | ||||
-rwxr-xr-x | qtinterface/tqt-replace.cmake | 6 | ||||
-rw-r--r-- | qtinterface/tqt.h.cmake (renamed from qtinterface/tqt.h) | 2 |
8 files changed, 407 insertions, 750 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f162092..00891dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ ################################################# # -# (C) 2010 Serghei Amelian +# (C) 2010-2011 Serghei Amelian # serghei (DOT) amelian (AT) gmail.com # # Improvements and feedback are welcome @@ -9,760 +9,35 @@ # ################################################# -cmake_minimum_required( VERSION 2.6 ) - project( tqt ) + set( TQT_MAJOR_VERSION 3 ) set( TQT_MINOR_VERSION 5 ) -set( TQT_MICRO_VERSION 12 ) +set( TQT_MICRO_VERSION 13 ) set( TQT_VERSION "${TQT_MAJOR_VERSION}.${TQT_MINOR_VERSION}.${TQT_MICRO_VERSION}" ) -##### include essential cmake modules ########### -include( FindPkgConfig ) -include( CheckCXXSourceCompiles ) +##### cmake setup ############################### +cmake_minimum_required( VERSION 2.8 ) -##### include our cmake modules ################# +include( CheckCXXSourceCompiles ) set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) include( TDEMacros ) +include( ConfigureChecks.cmake ) -##### select Qt version ######################### - -option( WITH_QT3 "Enable Qt3 support" OFF ) -option( WITH_QT4 "Enable Qt4 support" OFF ) - -if( WITH_QT3 AND WITH_QT4 ) - tde_message_fatal( "You must select only one Qt version, not both" ) -elseif( WITH_QT3 ) - find_package( Qt ) - set( QT_VER 3 ) -elseif( WITH_QT4 ) - tde_message_fatal( "Qt4 support is not implemented yet" ) - find_package( Qt4 REQUIRED ) - set( QT_VER 4 ) -else( ) - tde_message_fatal( "You must select a Qt version" ) -endif( ) - - -##### paths setup ############################### - -macro( _tde_internal_setup_path _path _default ) - if( DEFINED ${_path} ) - set( ${_path} "${${_path}}" CACHE INTERNAL "" FORCE ) - else( ) - set( ${_path} "${_default}" ) - endif( ) -endmacro( _tde_internal_setup_path ) - -_tde_internal_setup_path( EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" ) -_tde_internal_setup_path( BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" ) -_tde_internal_setup_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" ) -_tde_internal_setup_path( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/${CMAKE_PROJECT_NAME}" ) -_tde_internal_setup_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" ) - - -set( tqt_TOOLS - qtinterface/moc-tqt - qtinterface/uic-tqt - qtinterface/mcopidl-tqt - qtinterface/dcopidl-tqt - qtinterface/dcopidlng-tqt - qtinterface/dcopidl2cpp-tqt - qtinterface/convert_qt_tqt1 - qtinterface/convert_qt_tqt2 - qtinterface/convert_qt_tqt3 - ${CMAKE_CURRENT_BINARY_DIR}/qtinterface/tmoc - ${CMAKE_CURRENT_BINARY_DIR}/qtinterface/tqt-replace - ${CMAKE_CURRENT_BINARY_DIR}/qtinterface/tqt-replace-stream -) - -set( tqt_INCS - qtinterface/tqt.h - qtinterface/tqtglobaldefines.h - qtinterface/tqaccel.h - qtinterface/tqaccessible.h - qtinterface/tqaction.h - qtinterface/tqapplication.h - qtinterface/tqasyncio.h - qtinterface/tqbuttongroup.h - qtinterface/tqbutton.h - qtinterface/tqcanvas.h - qtinterface/tqcdestyle.h - qtinterface/tqcheckbox.h - qtinterface/tqclipboard.h - qtinterface/tqcolordialog.h - qtinterface/tqcombobox.h - qtinterface/tqcommonstyle.h - qtinterface/tqdatabrowser.h - qtinterface/tqdatatable.h - qtinterface/tqdataview.h - qtinterface/tqdatetimeedit.h - qtinterface/tqdesktopwidget.h - qtinterface/tqdial.h - qtinterface/tqdialog.h - qtinterface/tqdns.h - qtinterface/tqdockarea.h - qtinterface/tqdockwindow.h - qtinterface/tqdragobject.h - qtinterface/tqerrormessage.h - qtinterface/tqeventloop.h - qtinterface/tqfiledialog.h - qtinterface/tqfontdialog.h - qtinterface/tqframe.h - qtinterface/tqftp.h - qtinterface/tqgl.h - qtinterface/tqgplugin.h - qtinterface/tqgrid.h - qtinterface/tqgridview.h - qtinterface/tqgroupbox.h - qtinterface/tqguardedptr.h - qtinterface/tqhbox.h - qtinterface/tqhbuttongroup.h - qtinterface/tqheader.h - qtinterface/tqhgroupbox.h - qtinterface/tqhttp.h - qtinterface/tqiconview.h - qtinterface/tqimageformatplugin.h - qtinterface/tqinputdialog.h - qtinterface/tqlabel.h - qtinterface/tqlayout.h - qtinterface/tqlcdnumber.h - qtinterface/tqlineedit.h - qtinterface/tqlistbox.h - qtinterface/tqlistview.h - qtinterface/tqlocalfs.h - qtinterface/tqmainwindow.h - qtinterface/tqmenubar.h - qtinterface/tqmessagebox.h - qtinterface/tqmotifplusstyle.h - qtinterface/tqmotifstyle.h - qtinterface/tqmultilineedit.h - qtinterface/tqnetworkprotocol.h - qtinterface/tqnp.h - qtinterface/tqobjectcleanuphandler.h - qtinterface/tqobject.h - qtinterface/tqplatinumstyle.h - qtinterface/tqpopupmenu.h - qtinterface/tqprintdialog.h - qtinterface/tqprocess.h - qtinterface/tqprogressbar.h - qtinterface/tqprogressdialog.h - qtinterface/tqpushbutton.h - qtinterface/tqradiobutton.h - qtinterface/tqrangecontrol.h - qtinterface/tqscrollbar.h - qtinterface/tqscrollview.h - qtinterface/tqsemimodal.h - qtinterface/tqserversocket.h - qtinterface/tqsessionmanager.h - qtinterface/tqsgistyle.h - qtinterface/tqsignal.h - qtinterface/tqsignalmapper.h - qtinterface/tqsizegrip.h - qtinterface/tqslider.h - qtinterface/tqsocket.h - qtinterface/tqsocketnotifier.h - qtinterface/tqsound.h - qtinterface/tqspinbox.h - qtinterface/tqsplashscreen.h - qtinterface/tqsplitter.h - qtinterface/tqsqldatabase.h - qtinterface/tqsqldriver.h - qtinterface/tqsqldriverplugin.h - qtinterface/tqsqlform.h - qtinterface/tqsqlquery.h - qtinterface/tqstatusbar.h - qtinterface/tqstyle.h - qtinterface/tqstyleplugin.h - qtinterface/tqstylesheet.h - qtinterface/tqtabbar.h - qtinterface/tqtabdialog.h - qtinterface/tqtable.h - qtinterface/tqtabwidget.h - qtinterface/tqtextbrowser.h - qtinterface/tqtextcodecplugin.h - qtinterface/tqtextedit.h - qtinterface/tqtextview.h - qtinterface/tqtimer.h - qtinterface/tqtoolbar.h - qtinterface/tqtoolbox.h - qtinterface/tqtoolbutton.h - qtinterface/tqtooltip.h - qtinterface/tqtranslator.h - qtinterface/tqurloperator.h - qtinterface/tqvalidator.h - qtinterface/tqvbox.h - qtinterface/tqvbuttongroup.h - qtinterface/tqvgroupbox.h - qtinterface/tqwidget.h - qtinterface/tqwidgetplugin.h - qtinterface/tqwidgetstack.h - qtinterface/tqwindowsstyle.h - qtinterface/tqwizard.h - qtinterface/tqworkspace.h - qtinterface/tqapp.h - qtinterface/tqarray.h - qtinterface/tqbitarry.h - qtinterface/tqbttngrp.h - qtinterface/tqchkbox.h - qtinterface/tqclipbrd.h - qtinterface/tqcollect.h - qtinterface/tqcollection.h - qtinterface/tqcombo.h - qtinterface/tqconfig.h - qtinterface/tqconnect.h - qtinterface/tqdatetm.h - qtinterface/tqdrawutl.h - qtinterface/tqdstream.h - qtinterface/tqfeatures.h - qtinterface/tqfiledef.h - qtinterface/tqfiledlg.h - qtinterface/tqfileinf.h - qtinterface/tqfontinf.h - qtinterface/tqfontmet.h - qtinterface/tqgbkcodec.h - qtinterface/tqgeneric.h - qtinterface/tqgif.h - qtinterface/tqglobal.h - qtinterface/tqgrpbox.h - qtinterface/tqintcach.h - qtinterface/tqiodev.h - qtinterface/tqjpegio.h - qtinterface/tqkeycode.h - qtinterface/tqlined.h - qtinterface/tqlist.h - qtinterface/tqmenudta.h - qtinterface/tqmetaobj.h - qtinterface/tqmlined.h - qtinterface/tqmngio.h - qtinterface/tqmodules.h - qtinterface/tqmsgbox.h - qtinterface/tqmultilinedit.h - qtinterface/tqnetwork.h - qtinterface/tqobjcoll.h - qtinterface/tqobjdefs.h - qtinterface/tqpaintdc.h - qtinterface/tqpaintd.h - qtinterface/tqpdevmet.h - qtinterface/tqpmcache.h - qtinterface/tqpntarry.h - qtinterface/tqpopmenu.h - qtinterface/tqprndlg.h - qtinterface/tqprogbar.h - qtinterface/tqprogdlg.h - qtinterface/tqpushbt.h - qtinterface/tqqueue.h - qtinterface/tqradiobt.h - qtinterface/tqrangect.h - qtinterface/tqscrbar.h - qtinterface/tqsession.h - qtinterface/tqsocknot.h - qtinterface/tqstack.h - qtinterface/tqtabdlg.h - qtinterface/tqtstream.h - qtinterface/tqvector.h - qtinterface/tqwidcoll.h - qtinterface/tqwindefs.h - qtinterface/tqwindowdefs.h - qtinterface/tqwinexport.h - qtinterface/tq1xcompatibility.h - qtinterface/tqabstractlayout.h - qtinterface/tqasciicache.h - qtinterface/tqasciidict.h - qtinterface/tqasyncimageio.h - qtinterface/tqbig5codec.h - qtinterface/tqbitarray.h - qtinterface/tqbitmap.h - qtinterface/tqbrush.h - qtinterface/tqbuffer.h - qtinterface/tqcache.h - qtinterface/tqcleanuphandler.h - qtinterface/tqcolor.h - qtinterface/tqcompactstyle.h - qtinterface/tqconnection.h - qtinterface/tqcstring.h - qtinterface/tqcursor.h - qtinterface/tqdatastream.h - qtinterface/tqdatetime.h - qtinterface/tqdeepcopy.h - qtinterface/tqdict.h - qtinterface/tqdir.h - qtinterface/tqdom.h - qtinterface/tqdrawutil.h - qtinterface/tqdropsite.h - qtinterface/tqeditorfactory.h - qtinterface/tqeucjpcodec.h - qtinterface/tqeuckrcodec.h - qtinterface/tqevent.h - qtinterface/tqfile.h - qtinterface/tqfileinfo.h - qtinterface/tqfocusdata.h - qtinterface/tqfontdatabase.h - qtinterface/tqfont.h - qtinterface/tqfontinfo.h - qtinterface/tqfontmetrics.h - qtinterface/tqgarray.h - qtinterface/tqgb18030codec.h - qtinterface/tqgcache.h - qtinterface/tqgdict.h - qtinterface/tqglcolormap.h - qtinterface/tqglist.h - qtinterface/tqgvector.h - qtinterface/tqhostaddress.h - qtinterface/tqiconset.h - qtinterface/tqimage.h - qtinterface/tqintcache.h - qtinterface/tqintdict.h - qtinterface/tqinterlacestyle.h - qtinterface/tqiodevice.h - qtinterface/tqjiscodec.h - qtinterface/tqjpunicode.h - qtinterface/tqkeysequence.h - qtinterface/tqlibrary.h - qtinterface/tqlocale.h - qtinterface/tqmap.h - qtinterface/tqmemarray.h - qtinterface/tqmenudata.h - qtinterface/tqmetaobject.h - qtinterface/tqmime.h - qtinterface/tqmovie.h - qtinterface/tqmutex.h - qtinterface/tqnamespace.h - qtinterface/tqobjectdict.h - qtinterface/tqobjectlist.h - qtinterface/tqpaintdevice.h - qtinterface/tqpaintdevicemetrics.h - qtinterface/tqpainter.h - qtinterface/tqpair.h - qtinterface/tqpalette.h - qtinterface/tqpen.h - qtinterface/tqpicture.h - qtinterface/tqpixmapcache.h - qtinterface/tqpixmap.h - qtinterface/tqpngio.h - qtinterface/tqpointarray.h - qtinterface/tqpoint.h - qtinterface/tqpolygonscanner.h - qtinterface/tqprinter.h - qtinterface/tqptrcollection.h - qtinterface/tqptrdict.h - qtinterface/tqptrlist.h - qtinterface/tqptrqueue.h - qtinterface/tqptrstack.h - qtinterface/tqptrvector.h - qtinterface/tqrect.h - qtinterface/tqregexp.h - qtinterface/tqregion.h - qtinterface/tqrtlcodec.h - qtinterface/tqsemaphore.h - qtinterface/tqsettings.h - qtinterface/tqshared.h - qtinterface/tqsignalslotimp.h - qtinterface/tqsimplerichtext.h - qtinterface/tqsize.h - qtinterface/tqsizepolicy.h - qtinterface/tqsjiscodec.h - qtinterface/tqsocketdevice.h - qtinterface/tqsortedlist.h - qtinterface/tqsqlcursor.h - qtinterface/tqsqleditorfactory.h - qtinterface/tqsqlerror.h - qtinterface/tqsqlfield.h - qtinterface/tqsql.h - qtinterface/tqsqlindex.h - qtinterface/tqsqlpropertymap.h - qtinterface/tqsqlrecord.h - qtinterface/tqsqlresult.h - qtinterface/tqsqlselectcursor.h - qtinterface/tqstring.h - qtinterface/tqstringlist.h - qtinterface/tqstrlist.h - qtinterface/tqstrvec.h - qtinterface/tqstylefactory.h - qtinterface/tqsyntaxhighlighter.h - qtinterface/tqtextcodecfactory.h - qtinterface/tqtextcodec.h - qtinterface/tqtextstream.h - qtinterface/tqthread.h - qtinterface/tqthreadstorage.h - qtinterface/tqtl.h - qtinterface/tqtsciicodec.h - qtinterface/tqurl.h - qtinterface/tqurlinfo.h - qtinterface/tqutfcodec.h - qtinterface/tquuid.h - qtinterface/tqvaluelist.h - qtinterface/tqvaluestack.h - qtinterface/tqvaluevector.h - qtinterface/tqvariant.h - qtinterface/tqvfbhdr.h - qtinterface/tqwaitcondition.h - qtinterface/tqwhatsthis.h - qtinterface/tqwidgetfactory.h - qtinterface/tqwidgetintdict.h - qtinterface/tqwidgetlist.h - qtinterface/tqwmatrix.h - qtinterface/tqxml.h - qtinterface/private/tqucomextra_p.h - qtinterface/private/tqlayoutengine_p.h - qtinterface/private/tqinternal_p.h - qtinterface/private/tqeffects_p.h - qtinterface/tqlistiterator.h -) - -set( tqt_SRCS - qtinterface/tqt.cpp - qtinterface/tqaccel.cpp - qtinterface/tqaccessible.cpp - qtinterface/tqaction.cpp - qtinterface/tqapplication.cpp - qtinterface/tqasyncio.cpp - qtinterface/tqbuttongroup.cpp - qtinterface/tqbutton.cpp - qtinterface/tqcanvas.cpp - qtinterface/tqcdestyle.cpp - qtinterface/tqcheckbox.cpp - qtinterface/tqclipboard.cpp - qtinterface/tqcolordialog.cpp - qtinterface/tqcombobox.cpp - qtinterface/tqcommonstyle.cpp - qtinterface/tqdatabrowser.cpp - qtinterface/tqdatatable.cpp - qtinterface/tqdataview.cpp - qtinterface/tqdatetimeedit.cpp - qtinterface/tqdesktopwidget.cpp - qtinterface/tqdial.cpp - qtinterface/tqdialog.cpp - qtinterface/tqdns.cpp - qtinterface/tqdockarea.cpp - qtinterface/tqdockwindow.cpp - qtinterface/tqdragobject.cpp - qtinterface/tqerrormessage.cpp - qtinterface/tqeventloop.cpp - qtinterface/tqframe.cpp - qtinterface/tqftp.cpp - qtinterface/tqfiledialog.cpp - qtinterface/tqfontdialog.cpp - qtinterface/tqgl.cpp - qtinterface/tqgplugin.cpp - qtinterface/tqgrid.cpp - qtinterface/tqgridview.cpp - qtinterface/tqgroupbox.cpp - qtinterface/tqguardedptr.cpp - qtinterface/tqhbox.cpp - qtinterface/tqhbuttongroup.cpp - qtinterface/tqheader.cpp - qtinterface/tqhgroupbox.cpp - qtinterface/tqhttp.cpp - qtinterface/tqiconview.cpp - qtinterface/tqimageformatplugin.cpp - qtinterface/tqinputdialog.cpp - qtinterface/tqlabel.cpp - qtinterface/tqlayout.cpp - qtinterface/tqlcdnumber.cpp - qtinterface/tqlineedit.cpp - qtinterface/tqlistbox.cpp - qtinterface/tqlistview.cpp - qtinterface/tqlocalfs.cpp - qtinterface/tqmainwindow.cpp - qtinterface/tqmenubar.cpp - qtinterface/tqmessagebox.cpp - qtinterface/tqmotifplusstyle.cpp - qtinterface/tqmotifstyle.cpp - qtinterface/tqmultilineedit.cpp - qtinterface/tqnetworkprotocol.cpp - qtinterface/tqnp.cpp - qtinterface/tqobjectcleanuphandler.cpp - qtinterface/tqobject.cpp - qtinterface/tqplatinumstyle.cpp - qtinterface/tqpopupmenu.cpp - qtinterface/tqprintdialog.cpp - qtinterface/tqprocess.cpp - qtinterface/tqprogressbar.cpp - qtinterface/tqprogressdialog.cpp - qtinterface/tqpushbutton.cpp - qtinterface/tqradiobutton.cpp - qtinterface/tqrangecontrol.cpp - qtinterface/tqscrollbar.cpp - qtinterface/tqscrollview.cpp - qtinterface/tqsemimodal.cpp - qtinterface/tqserversocket.cpp - qtinterface/tqsessionmanager.cpp - qtinterface/tqsgistyle.cpp - qtinterface/tqsignal.cpp - qtinterface/tqsignalmapper.cpp - qtinterface/tqsizegrip.cpp - qtinterface/tqslider.cpp - qtinterface/tqsocket.cpp - qtinterface/tqsocketnotifier.cpp - qtinterface/tqsound.cpp - qtinterface/tqspinbox.cpp - qtinterface/tqsplashscreen.cpp - qtinterface/tqsplitter.cpp - qtinterface/tqsqldatabase.cpp - qtinterface/tqsqldriver.cpp - qtinterface/tqsqldriverplugin.cpp - qtinterface/tqsqlform.cpp - qtinterface/tqsqlquery.cpp - qtinterface/tqstatusbar.cpp - qtinterface/tqstyle.cpp - qtinterface/tqstyleplugin.cpp - qtinterface/tqstylesheet.cpp - qtinterface/tqtabbar.cpp - qtinterface/tqtabdialog.cpp - qtinterface/tqtable.cpp - qtinterface/tqtabwidget.cpp - qtinterface/tqtextbrowser.cpp - qtinterface/tqtextcodecplugin.cpp - qtinterface/tqtextedit.cpp - qtinterface/tqtextview.cpp - qtinterface/tqtimer.cpp - qtinterface/tqtoolbar.cpp - qtinterface/tqtoolbox.cpp - qtinterface/tqtoolbutton.cpp - qtinterface/tqtooltip.cpp - qtinterface/tqtranslator.cpp - qtinterface/tqurloperator.cpp - qtinterface/tqvalidator.cpp - qtinterface/tqvbox.cpp - qtinterface/tqvbuttongroup.cpp - qtinterface/tqvgroupbox.cpp - qtinterface/tqwidget.cpp - qtinterface/tqwidgetplugin.cpp - qtinterface/tqwidgetstack.cpp - qtinterface/tqwindowsstyle.cpp - qtinterface/tqwizard.cpp - qtinterface/tqworkspace.cpp - qtinterface/tq1xcompatibility.cpp - qtinterface/tqabstractlayout.cpp - qtinterface/tqasciicache.cpp - qtinterface/tqasciidict.cpp - qtinterface/tqasyncimageio.cpp - qtinterface/tqbig5codec.cpp - qtinterface/tqbitarray.cpp - qtinterface/tqbitmap.cpp - qtinterface/tqbrush.cpp - qtinterface/tqbuffer.cpp - qtinterface/tqcache.cpp - qtinterface/tqcleanuphandler.cpp - qtinterface/tqcolor.cpp - qtinterface/tqcompactstyle.cpp - qtinterface/tqconnection.cpp - qtinterface/tqcstring.cpp - qtinterface/tqcursor.cpp - qtinterface/tqdatastream.cpp - qtinterface/tqdatetime.cpp - qtinterface/tqdeepcopy.cpp - qtinterface/tqdict.cpp - qtinterface/tqdir.cpp - qtinterface/tqdom.cpp - qtinterface/tqdrawutil.cpp - qtinterface/tqdropsite.cpp - qtinterface/tqeditorfactory.cpp - qtinterface/tqeucjpcodec.cpp - qtinterface/tqeuckrcodec.cpp - qtinterface/tqevent.cpp - qtinterface/tqfile.cpp - qtinterface/tqfileinfo.cpp - qtinterface/tqfocusdata.cpp - qtinterface/tqfontdatabase.cpp - qtinterface/tqfont.cpp - qtinterface/tqfontinfo.cpp - qtinterface/tqfontmetrics.cpp - qtinterface/tqgarray.cpp - qtinterface/tqgb18030codec.cpp - qtinterface/tqgcache.cpp - qtinterface/tqgdict.cpp - qtinterface/tqglcolormap.cpp - qtinterface/tqglist.cpp - qtinterface/tqgvector.cpp - qtinterface/tqhostaddress.cpp - qtinterface/tqiconset.cpp - qtinterface/tqimage.cpp - qtinterface/tqintcache.cpp - qtinterface/tqintdict.cpp - qtinterface/tqinterlacestyle.cpp - qtinterface/tqiodevice.cpp - qtinterface/tqjiscodec.h - qtinterface/tqjpunicode.cpp - qtinterface/tqkeysequence.cpp - qtinterface/tqlibrary.cpp - qtinterface/tqlocale.cpp - qtinterface/tqmap.cpp - qtinterface/tqmemarray.cpp - qtinterface/tqmenudata.cpp - qtinterface/tqmetaobject.cpp - qtinterface/tqmime.cpp - qtinterface/tqmovie.cpp - qtinterface/tqmutex.cpp - qtinterface/tqnamespace.cpp - qtinterface/tqobjectdict.cpp - qtinterface/tqobjectlist.cpp - qtinterface/tqpaintdevice.cpp - qtinterface/tqpaintdevicemetrics.cpp - qtinterface/tqpainter.cpp - qtinterface/tqpair.cpp - qtinterface/tqpalette.cpp - qtinterface/tqpen.cpp - qtinterface/tqpicture.cpp - qtinterface/tqpixmapcache.cpp - qtinterface/tqpixmap.cpp - qtinterface/tqpngio.cpp - qtinterface/tqpointarray.cpp - qtinterface/tqpoint.cpp - qtinterface/tqpolygonscanner.cpp - qtinterface/tqprinter.cpp - qtinterface/tqptrcollection.cpp - qtinterface/tqptrdict.cpp - qtinterface/tqptrlist.cpp - qtinterface/tqptrqueue.cpp - qtinterface/tqptrstack.cpp - qtinterface/tqptrvector.cpp - qtinterface/tqrect.cpp - qtinterface/tqregexp.cpp - qtinterface/tqregion.cpp - qtinterface/tqrtlcodec.cpp - qtinterface/tqsemaphore.cpp - qtinterface/tqsettings.cpp - qtinterface/tqshared.cpp - qtinterface/tqsignalslotimp.cpp - qtinterface/tqsimplerichtext.cpp - qtinterface/tqsize.cpp - qtinterface/tqsizepolicy.cpp - qtinterface/tqsjiscodec.cpp - qtinterface/tqsocketdevice.cpp - qtinterface/tqsortedlist.cpp - qtinterface/tqsqlcursor.cpp - qtinterface/tqsqleditorfactory.cpp - qtinterface/tqsqlerror.cpp - qtinterface/tqsqlfield.cpp - qtinterface/tqsql.cpp - qtinterface/tqsqlindex.cpp - qtinterface/tqsqlpropertymap.cpp - qtinterface/tqsqlrecord.cpp - qtinterface/tqsqlresult.cpp - qtinterface/tqsqlselectcursor.cpp - qtinterface/tqstring.cpp - qtinterface/tqstringlist.cpp - qtinterface/tqstrlist.cpp - qtinterface/tqstrvec.cpp - qtinterface/tqstylefactory.cpp - qtinterface/tqsyntaxhighlighter.cpp - qtinterface/tqtextcodecfactory.cpp - qtinterface/tqtextcodec.cpp - qtinterface/tqtextstream.cpp - qtinterface/tqthread.cpp - qtinterface/tqthreadstorage.cpp - qtinterface/tqtl.cpp - qtinterface/tqtsciicodec.cpp - qtinterface/tqurl.cpp - qtinterface/tqurlinfo.cpp - qtinterface/tqutfcodec.cpp - qtinterface/tquuid.cpp - qtinterface/tqvaluelist.cpp - qtinterface/tqvaluestack.cpp - qtinterface/tqvaluevector.cpp - qtinterface/tqvariant.cpp - qtinterface/tqvfbhdr.cpp - qtinterface/tqwaitcondition.cpp - qtinterface/tqwhatsthis.cpp - qtinterface/tqwidgetfactory.cpp - qtinterface/tqwidgetintdict.cpp - qtinterface/tqwidgetlist.cpp - qtinterface/tqwmatrix.cpp - qtinterface/tqxml.cpp - qtinterface/private/tqucomextra_p.cpp - qtinterface/tqlistiterator.cpp -) - -################################################# -# -# On some systems (without immqt) qinputcontext.h -# and qinputcontextfactory.h can missing, so we -# must to exclude it from compiling/installing. -# - -if( NOT WITHOUT_INPUTCONTEXT ) - - include( CheckIncludeFile ) - set( bak_CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ) - set( CMAKE_REQUIRED_DEFINITIONS -I${QT_INCLUDE_DIR} -DQINPUTCONTEXT_H -DQINPUTCONTEXTFACTORY_H ) - - check_include_file( "qinputcontext.h" HAVE_QINPUTCONTEXT_H ) - if( HAVE_QINPUTCONTEXT_H ) - set( tqt_INCS ${tqt_INCS} qtinterface/tqinputcontext.h ) - set( tqt_SRCS ${tqt_SRCS} qtinterface/tqinputcontext.cpp ) - endif( HAVE_QINPUTCONTEXT_H ) - - check_include_file( "qinputcontextfactory.h" HAVE_QINPUTCONTEXTFACTORY_H ) - if( HAVE_QINPUTCONTEXTFACTORY_H ) - set( tqt_INCS ${tqt_INCS} qtinterface/tqinputcontextfactory.h ) - set( tqt_SRCS ${tqt_SRCS} qtinterface/tqinputcontextfactory.cpp ) - endif( HAVE_QINPUTCONTEXTFACTORY_H ) - - set( CMAKE_REQUIRED_DEFINITIONS ${bak_CMAKE_REQUIRED_DEFINITIONS} ) - unset( bak_CMAKE_REQUIRED_DEFINITIONS ) - -endif( NOT WITHOUT_INPUTCONTEXT ) - -# -################################################# - - -configure_file( qtinterface/tmoc.cmake qtinterface/tmoc @ONLY ) -configure_file( qtinterface/tqt-replace.cmake qtinterface/tqt-replace @ONLY ) -configure_file( qtinterface/tqt-replace-stream.cmake qtinterface/tqt-replace-stream @ONLY ) - -add_definitions( ${QT_DEFINITIONS} -DUSE_QT${QT_VER} ) -include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/qtinterface ${QT_INCLUDE_DIRS} ) -set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) -link_directories( ${QT_LIBRARY_DIRS} ) - -add_library( tqt SHARED ${tqt_SRCS} ) -set_target_properties( tqt PROPERTIES VERSION 4.2.0 SOVERSION 4 ) -target_link_libraries( tqt ${QT_LIBRARIES} ) - - -### FIXME Follow thing must be rewritten from scratch - -##### split QT_DEFINITIONS and QT_LIBRARIES for using in TQt.pc - -set( PKGCONFIG_QT_DEFINITIONS "-DUSE_QT${QT_VER}" ) -foreach( DEF ${QT_DEFINITIONS} ) - set( PKGCONFIG_QT_DEFINITIONS "${PKGCONFIG_QT_DEFINITIONS} ${DEF}" ) -endforeach( DEF ${QT_DEFINITIONS} ) - -# a pretty ugly hack for extracting Qt library parameters -get_filename_component( QT_LIBRARY_DIR ${QT_LIBRARY_DIRS} PATH ) -set( PKGCONFIG_QT_LIBRARIES "-L${QT_LIBRARY_DIRS}" ) -foreach( LIB ${QT_LIBRARIES} ) - get_filename_component( LIB ${LIB} NAME_WE ) - string( REGEX REPLACE "^lib" "" LIB ${LIB} ) - string( REGEX REPLACE "^-l" "" LIB ${LIB} ) - # we don't need qassistantclient, I think - if( NOT ${LIB} STREQUAL "qassistantclient" ) - set( PKGCONFIG_QT_LIBRARIES "${PKGCONFIG_QT_LIBRARIES} -l${LIB}" ) - endif( NOT ${LIB} STREQUAL "qassistantclient" ) -endforeach( LIB ${PKGCONFIG_QT_LIBRARIES} ) - - -##### write TQt.pc ############################## -string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} ) -string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} ) -string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} ) +##### install paths setup ####################### -configure_file( qtinterface/TQt.pc.cmake qtinterface/TQt.pc @ONLY ) +tde_setup_install_path( EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" ) +tde_setup_install_path( BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" ) +tde_setup_install_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" ) +tde_setup_install_path( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/tqt" ) +tde_setup_install_path( PKGCONFIG_INSTALL_DIR "/usr/lib${LIB_SUFFIX}/pkgconfig" ) -##### install ################################### +##### tqtinterface sources ###################### -install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qtinterface/TQt.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} ) -install( PROGRAMS ${tqt_TOOLS} DESTINATION ${BIN_INSTALL_DIR} ) -install( TARGETS tqt LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) -install( FILES ${tqt_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} ) -install( DIRECTORY qtinterface/tqt4/Qt DESTINATION ${INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE ) +add_subdirectory( qtinterface ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..b405ec1 --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,182 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +macro( qt_message ) + message( STATUS "${ARGN}" ) +endmacro( ) + + +if( DEFINED USE_QT3 ) + set( QT_VERSION "3" ) +elseif( DEFINED USE_QT4 ) + set( QT_VERSION "4" ) +endif() + + +if( NOT DEFINED QT_VERSION ) + tde_message_fatal( "You must select a Qt version, like this:\n \n cmake -DQT_VERSION=3 [arguments...]\n or\n cmake -DUSE_QT3=ON [arguments...]" ) +endif( ) + + +if( NOT (QT_VERSION STREQUAL "3" OR QT_VERSION STREQUAL "4") ) + tde_message_fatal( "You have chosen an invalid version.\n QT_VERSION should be 3 or 4." ) +else( ) + qt_message( "Checking for Qt${QT_VERSION}..." ) +endif( ) + + +# qt prefix directory +if( NOT DEFINED QT_PREFIX_DIR ) + if( NOT $ENV{QTDIR} STREQUAL "" AND QT_VERSION STREQUAL "3" ) + set( QT_PREFIX_DIR "$ENV{QTDIR}" ) + qt_message( " QT_PREFIX_DIR is set to QTDIR" ) + else( ) + set( QT_PREFIX_DIR "/usr" ) + endif( ) +endif( ) +qt_message( " QT_PREFIX_DIR : ${QT_PREFIX_DIR}" ) + + +# qt headers +if( NOT DEFINED QT_INCLUDE_DIR ) + if( QT_PREFIX_DIR STREQUAL "/usr" ) + set( QT_INCLUDE_DIR "${QT_PREFIX_DIR}/include/qt${QT_VERSION}" ) + else( ) + set( QT_INCLUDE_DIR "${QT_PREFIX_DIR}/include" ) + endif( ) +endif( ) +qt_message( " QT_INCLUDE_DIR: ${QT_INCLUDE_DIR}" ) + + +# qt library path +if( NOT DEFINED QT_LIBRARY_DIR ) + set( QT_LIBRARY_DIR "${QT_PREFIX_DIR}/lib${LIB_SUFFIX}" ) + if( QT_VERSION STREQUAL "4" ) + if( NOT EXISTS "${QT_LIBRARY_DIR}/libQtGui.so" ) + if( EXISTS "${QT_LIBRARY_DIR}/qt4/libQtGui.so" ) + set( QT_LIBRARY_DIR "${QT_PREFIX_DIR}/lib${LIB_SUFFIX}/qt4" ) + endif( ) + endif( ) + endif( ) +endif( ) +qt_message( " QT_LIBRARY_DIR: ${QT_LIBRARY_DIR}" ) + + +# qt library name +if( NOT DEFINED QT_LIBRARIES ) + if( QT_VERSION STREQUAL "3" ) + set( QT_LIBRARIES qt-mt ) + elseif( QT_VERSION STREQUAL "4" ) + set( QT_LIBRARIES QtCore QtGui ) + endif( ) +endif( ) + + +# qt tools +if( NOT DEFINED QT_BINARY_DIR ) + set( QT_BINARY_DIR "${QT_PREFIX_DIR}/bin" ) +endif( ) +qt_message( " QT_BINARY_DIR : ${QT_BINARY_DIR}" ) + + +# find moc +if( DEFINED MOC_EXECUTABLE ) + if( IS_DIRECTORY "${MOC_EXECUTABLE}" OR NOT EXISTS "${MOC_EXECUTABLE}" ) + tde_message_fatal( "moc was NOT found.\n MOC_EXECUTABLE may not be set correctly." ) + endif( ) +else( ) + find_program( MOC_EXECUTABLE NAMES moc HINTS "${QT_BINARY_DIR}" ) + if( NOT MOC_EXECUTABLE ) + tde_message_fatal( "moc was NOT found.\n Please check if your Qt${QT_VERSION} is correctly installed." ) + endif( ) +endif( ) + +# attempt to run moc, to check which qt version is using +execute_process( COMMAND ${MOC_EXECUTABLE} -v ERROR_VARIABLE __output + RESULT_VARIABLE __result ERROR_STRIP_TRAILING_WHITESPACE ) + +if( __result EQUAL 1 ) + string( REGEX MATCH "^.*Qt (.+)\\)$" __dummy "${__output}" ) + set( __version "${CMAKE_MATCH_1}" ) + if( NOT __version ) + tde_message_fatal( "Invalid response from moc:\n ${__output}" ) + endif( ) +else( ) + tde_message_fatal( "Unable to run moc!\n Qt${VERSION} are correctly installed?\n LD_LIBRARY_PATH are correctly set?" ) +endif( ) + +qt_message( " MOC_EXECUTABLE: ${MOC_EXECUTABLE} (using Qt ${CMAKE_MATCH_1})" ) + +if( QT_VERSION STREQUAL "3" AND NOT "${CMAKE_MATCH_1}" VERSION_LESS "4" ) + tde_message_fatal( "Strange, you want Qt3, but your moc using Qt4." ) +elseif( QT_VERSION STREQUAL "4" AND "${CMAKE_MATCH_1}" VERSION_LESS "4" ) + tde_message_fatal( "Strange, you want Qt4, but your moc using Qt3." ) +endif( ) + + +# find uic (only for Qt3) +if( QT_VERSION STREQUAL "3" ) + if( DEFINED UIC_EXECUTABLE ) + if( IS_DIRECTORY "${UIC_EXECUTABLE}" OR NOT EXISTS "${UIC_EXECUTABLE}" ) + tde_message_fatal( "uic was NOT found.\n MOC_EXECUTABLE may not be set correctly" ) + endif( ) + else( ) + find_program( UIC_EXECUTABLE NAMES uic HINTS "${QT_BINARY_DIR}" ) + if( NOT UIC_EXECUTABLE ) + tde_message_fatal( "uic was NOT found.\n Please check if your Qt${QT_VERSION} is correctly installed." ) + endif( ) + endif( ) + qt_message( " UIC_EXECUTABLE: ${UIC_EXECUTABLE}" ) +endif( ) + + +# definitions +if( QT_VERSION STREQUAL "3" ) + set( QT_DEFINITIONS "-DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT" ) +elseif( QT_VERSION STREQUAL "4" ) + set( QT_DEFINITIONS "-DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT" ) +endif( ) + + +tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES ) +set( CMAKE_REQUIRED_INCLUDES ${QT_INCLUDE_DIR} ) +set( CMAKE_REQUIRED_LIBRARIES -L${QT_LIBRARY_DIR} ${QT_LIBRARIES} ) + +# check if Qt3 is usable +if( QT_VERSION STREQUAL "3" ) + check_cxx_source_compiles(" + #include <qapplication.h> + int main(int argc, char **argv) { QApplication app(argc, argv); return 0; } " + HAVE_USABLE_QT${QT_VERSION} ) +# check if Qt4 is usable +elseif( QT_VERSION STREQUAL "4" ) + check_cxx_source_compiles(" + #include <QtGui/QApplication> + int main(int argc, char **argv) { QApplication app(argc, argv); return 0; } " + HAVE_USABLE_QT${QT_VERSION} ) +endif( ) +if( NOT HAVE_USABLE_QT${QT_VERSION} ) + tde_message_fatal( "Unable to build a simple Qt${QT_VERSION} test." ) +endif( ) + +# check if Qt3 is patched for compatibility with TQt +if( QT_VERSION STREQUAL "3" ) + check_cxx_source_compiles(" + #include <qobjectlist.h> + #include <qobject.h> + int main(int, char**) { QObject::objectTreesListObject(); return 0; } " + HAVE_PATCHED_QT3 ) + if( NOT HAVE_PATCHED_QT3 ) + tde_message_fatal( "Your Qt3 is not patched for compatibility with tqtinterface." ) + endif( ) +endif( ) + +tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES ) diff --git a/qtinterface/CMakeLists.txt b/qtinterface/CMakeLists.txt new file mode 100644 index 0000000..56931ed --- /dev/null +++ b/qtinterface/CMakeLists.txt @@ -0,0 +1,195 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/private + ${QT_INCLUDE_DIR} +) + +link_directories( + ${QT_LIBRARY_DIR} +) + + +##### headers ################################### + +configure_file( tqt.h.cmake tqt.h @ONLY ) + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/tqt.h tqtglobaldefines.h tqaccel.h tqaccessible.h + tqaction.h tqapplication.h tqasyncio.h tqbuttongroup.h tqbutton.h tqcanvas.h + tqcdestyle.h tqcheckbox.h tqclipboard.h tqcolordialog.h tqcombobox.h + tqcommonstyle.h tqdatabrowser.h tqdatatable.h tqdataview.h tqdatetimeedit.h + tqdesktopwidget.h tqdial.h tqdialog.h tqdns.h tqdockarea.h tqdockwindow.h + tqdragobject.h tqerrormessage.h tqeventloop.h tqfiledialog.h tqfontdialog.h + tqframe.h tqftp.h tqgl.h tqgplugin.h tqgrid.h tqgridview.h tqgroupbox.h + tqguardedptr.h tqhbox.h tqhbuttongroup.h tqheader.h tqhgroupbox.h + tqhttp.h tqiconview.h tqimageformatplugin.h tqinputdialog.h tqlabel.h + tqlayout.h tqlcdnumber.h tqlineedit.h tqlistbox.h tqlistview.h tqlocalfs.h + tqmainwindow.h tqmenubar.h tqmessagebox.h tqmotifplusstyle.h tqmotifstyle.h + tqmultilineedit.h tqnetworkprotocol.h tqnp.h tqobjectcleanuphandler.h + tqobject.h tqplatinumstyle.h tqpopupmenu.h tqprintdialog.h tqprocess.h + tqprogressbar.h tqprogressdialog.h tqpushbutton.h tqradiobutton.h + tqrangecontrol.h tqscrollbar.h tqscrollview.h tqsemimodal.h tqserversocket.h + tqsessionmanager.h tqsgistyle.h tqsignal.h tqsignalmapper.h tqsizegrip.h + tqslider.h tqsocket.h tqsocketnotifier.h tqsound.h tqspinbox.h tqsplashscreen.h + tqsplitter.h tqsqldatabase.h tqsqldriver.h tqsqldriverplugin.h tqsqlform.h + tqsqlquery.h tqstatusbar.h tqstyle.h tqstyleplugin.h tqstylesheet.h tqtabbar.h + tqtabdialog.h tqtable.h tqtabwidget.h tqtextbrowser.h tqtextcodecplugin.h + tqtextedit.h tqtextview.h tqtimer.h tqtoolbar.h tqtoolbox.h tqtoolbutton.h + tqtooltip.h tqtranslator.h tqurloperator.h tqvalidator.h tqvbox.h + tqvbuttongroup.h tqvgroupbox.h tqwidget.h tqwidgetplugin.h tqwidgetstack.h + tqwindowsstyle.h tqwizard.h tqworkspace.h tqapp.h tqarray.h tqbitarry.h + tqbttngrp.h tqchkbox.h tqclipbrd.h tqcollect.h tqcollection.h tqcombo.h + tqconfig.h tqconnect.h tqdatetm.h tqdrawutl.h tqdstream.h tqfeatures.h + tqfiledef.h tqfiledlg.h tqfileinf.h tqfontinf.h tqfontmet.h tqgbkcodec.h + tqgeneric.h tqgif.h tqglobal.h tqgrpbox.h tqintcach.h tqiodev.h tqjpegio.h + tqkeycode.h tqlined.h tqlist.h tqmenudta.h tqmetaobj.h tqmlined.h tqmngio.h + tqmodules.h tqmsgbox.h tqmultilinedit.h tqnetwork.h tqobjcoll.h tqobjdefs.h + tqpaintdc.h tqpaintd.h tqpdevmet.h tqpmcache.h tqpntarry.h tqpopmenu.h + tqprndlg.h tqprogbar.h tqprogdlg.h tqpushbt.h tqqueue.h tqradiobt.h tqrangect.h + tqscrbar.h tqsession.h tqsocknot.h tqstack.h tqtabdlg.h tqtstream.h tqvector.h + tqwidcoll.h tqwindefs.h tqwindowdefs.h tqwinexport.h tq1xcompatibility.h + tqabstractlayout.h tqasciicache.h tqasciidict.h tqasyncimageio.h tqbig5codec.h + tqbitarray.h tqbitmap.h tqbrush.h tqbuffer.h tqcache.h tqcleanuphandler.h + tqcolor.h tqcompactstyle.h tqconnection.h tqcstring.h tqcursor.h tqdatastream.h + tqdatetime.h tqdeepcopy.h tqdict.h tqdir.h tqdom.h tqdrawutil.h tqdropsite.h + tqeditorfactory.h tqeucjpcodec.h tqeuckrcodec.h tqevent.h tqfile.h tqfileinfo.h + tqfocusdata.h tqfontdatabase.h tqfont.h tqfontinfo.h tqfontmetrics.h + tqgarray.h tqgb18030codec.h tqgcache.h tqgdict.h tqglcolormap.h tqglist.h + tqgvector.h tqhostaddress.h tqiconset.h tqimage.h tqintcache.h tqintdict.h + tqinterlacestyle.h tqiodevice.h tqjiscodec.h tqjpunicode.h tqkeysequence.h + tqlibrary.h tqlocale.h tqmap.h tqmemarray.h tqmenudata.h tqmetaobject.h + tqmime.h tqmovie.h tqmutex.h tqnamespace.h tqobjectdict.h tqobjectlist.h + tqpaintdevice.h tqpaintdevicemetrics.h tqpainter.h tqpair.h tqpalette.h tqpen.h + tqpicture.h tqpixmapcache.h tqpixmap.h tqpngio.h tqpointarray.h tqpoint.h + tqpolygonscanner.h tqprinter.h tqptrcollection.h tqptrdict.h tqptrlist.h + tqptrqueue.h tqptrstack.h tqptrvector.h tqrect.h tqregexp.h tqregion.h + tqrtlcodec.h tqsemaphore.h tqsettings.h tqshared.h tqsignalslotimp.h + tqsimplerichtext.h tqsize.h tqsizepolicy.h tqsjiscodec.h tqsocketdevice.h + tqsortedlist.h tqsqlcursor.h tqsqleditorfactory.h tqsqlerror.h tqsqlfield.h + tqsql.h tqsqlindex.h tqsqlpropertymap.h tqsqlrecord.h tqsqlresult.h + tqsqlselectcursor.h tqstring.h tqstringlist.h tqstrlist.h tqstrvec.h + tqstylefactory.h tqsyntaxhighlighter.h tqtextcodecfactory.h tqtextcodec.h + tqtextstream.h tqthread.h tqthreadstorage.h tqtl.h tqtsciicodec.h tqurl.h + tqurlinfo.h tqutfcodec.h tquuid.h tqvaluelist.h tqvaluestack.h tqvaluevector.h + tqvariant.h tqvfbhdr.h tqwaitcondition.h tqwhatsthis.h tqwidgetfactory.h + tqwidgetintdict.h tqwidgetlist.h tqwmatrix.h tqxml.h private/tqucomextra_p.h + private/tqlayoutengine_p.h private/tqinternal_p.h private/tqeffects_p.h + tqlistiterator.h + DESTINATION ${INCLUDE_INSTALL_DIR} ) + +install( + DIRECTORY tqt4/Qt + DESTINATION ${INCLUDE_INSTALL_DIR} + PATTERN ".svn" EXCLUDE ) + + +##### tqt tools ################################# + +configure_file( tmoc.cmake tmoc @ONLY ) +configure_file( tqt-replace.cmake tqt-replace @ONLY ) +configure_file( tqt-replace-stream.cmake tqt-replace-stream @ONLY ) + +install( PROGRAMS + moc-tqt uic-tqt mcopidl-tqt dcopidl-tqt dcopidlng-tqt + dcopidl2cpp-tqt convert_qt_tqt1 convert_qt_tqt2 + convert_qt_tqt3 ${CMAKE_CURRENT_BINARY_DIR}/tmoc + ${CMAKE_CURRENT_BINARY_DIR}/tqt-replace + ${CMAKE_CURRENT_BINARY_DIR}/tqt-replace-stream + DESTINATION ${BIN_INSTALL_DIR} ) + + +##### tqt pkgconfig ############################# + +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} ) +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} ) +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} ) + +unset( PC_QT_LIBRARIES ) +foreach( _lib ${QT_LIBRARIES} ) + set( PC_QT_LIBRARIES "${PC_QT_LIBRARIES} -l${_lib}" ) +endforeach( ) + +configure_file( TQt.pc.cmake TQt.pc @ONLY ) + +install( FILES ${CMAKE_CURRENT_BINARY_DIR}/TQt.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} ) + + +##### tqt (shared) ############################## + + +tde_add_library( tqt SHARED + SOURCES + tqt.cpp tqaccel.cpp tqaccessible.cpp tqaction.cpp tqapplication.cpp + tqasyncio.cpp tqbuttongroup.cpp tqbutton.cpp tqcanvas.cpp tqcdestyle.cpp + tqcheckbox.cpp tqclipboard.cpp tqcolordialog.cpp tqcombobox.cpp + tqcommonstyle.cpp tqdatabrowser.cpp tqdatatable.cpp tqdataview.cpp + tqdatetimeedit.cpp tqdesktopwidget.cpp tqdial.cpp tqdialog.cpp tqdns.cpp + tqdockarea.cpp tqdockwindow.cpp tqdragobject.cpp tqerrormessage.cpp + tqeventloop.cpp tqframe.cpp tqftp.cpp tqfiledialog.cpp tqfontdialog.cpp + tqgl.cpp tqgplugin.cpp tqgrid.cpp tqgridview.cpp tqgroupbox.cpp + tqguardedptr.cpp tqhbox.cpp tqhbuttongroup.cpp tqheader.cpp + tqhgroupbox.cpp tqhttp.cpp tqiconview.cpp tqimageformatplugin.cpp + tqinputdialog.cpp tqlabel.cpp tqlayout.cpp tqlcdnumber.cpp tqlineedit.cpp + tqlistbox.cpp tqlistview.cpp tqlocalfs.cpp tqmainwindow.cpp tqmenubar.cpp + tqmessagebox.cpp tqmotifplusstyle.cpp tqmotifstyle.cpp tqmultilineedit.cpp + tqnetworkprotocol.cpp tqnp.cpp tqobjectcleanuphandler.cpp tqobject.cpp + tqplatinumstyle.cpp tqpopupmenu.cpp tqprintdialog.cpp tqprocess.cpp + tqprogressbar.cpp tqprogressdialog.cpp tqpushbutton.cpp tqradiobutton.cpp + tqrangecontrol.cpp tqscrollbar.cpp tqscrollview.cpp tqsemimodal.cpp + tqserversocket.cpp tqsessionmanager.cpp tqsgistyle.cpp tqsignal.cpp + tqsignalmapper.cpp tqsizegrip.cpp tqslider.cpp tqsocket.cpp + tqsocketnotifier.cpp tqsound.cpp tqspinbox.cpp tqsplashscreen.cpp + tqsplitter.cpp tqsqldatabase.cpp tqsqldriver.cpp tqsqldriverplugin.cpp + tqsqlform.cpp tqsqlquery.cpp tqstatusbar.cpp tqstyle.cpp tqstyleplugin.cpp + tqstylesheet.cpp tqtabbar.cpp tqtabdialog.cpp tqtable.cpp tqtabwidget.cpp + tqtextbrowser.cpp tqtextcodecplugin.cpp tqtextedit.cpp tqtextview.cpp + tqtimer.cpp tqtoolbar.cpp tqtoolbox.cpp tqtoolbutton.cpp tqtooltip.cpp + tqtranslator.cpp tqurloperator.cpp tqvalidator.cpp tqvbox.cpp + tqvbuttongroup.cpp tqvgroupbox.cpp tqwidget.cpp tqwidgetplugin.cpp + tqwidgetstack.cpp tqwindowsstyle.cpp tqwizard.cpp tqworkspace.cpp + tq1xcompatibility.cpp tqabstractlayout.cpp tqasciicache.cpp tqasciidict.cpp + tqasyncimageio.cpp tqbig5codec.cpp tqbitarray.cpp tqbitmap.cpp tqbrush.cpp + tqbuffer.cpp tqcache.cpp tqcleanuphandler.cpp tqcolor.cpp tqcompactstyle.cpp + tqconnection.cpp tqcstring.cpp tqcursor.cpp tqdatastream.cpp tqdatetime.cpp + tqdeepcopy.cpp tqdict.cpp tqdir.cpp tqdom.cpp tqdrawutil.cpp tqdropsite.cpp + tqeditorfactory.cpp tqeucjpcodec.cpp tqeuckrcodec.cpp tqevent.cpp tqfile.cpp + tqfileinfo.cpp tqfocusdata.cpp tqfontdatabase.cpp tqfont.cpp tqfontinfo.cpp + tqfontmetrics.cpp tqgarray.cpp tqgb18030codec.cpp tqgcache.cpp tqgdict.cpp + tqglcolormap.cpp tqglist.cpp tqgvector.cpp tqhostaddress.cpp tqiconset.cpp + tqimage.cpp tqintcache.cpp tqintdict.cpp tqinterlacestyle.cpp tqiodevice.cpp + tqjiscodec.h tqjpunicode.cpp tqkeysequence.cpp tqlibrary.cpp tqlocale.cpp + tqmap.cpp tqmemarray.cpp tqmenudata.cpp tqmetaobject.cpp tqmime.cpp tqmovie.cpp + tqmutex.cpp tqnamespace.cpp tqobjectdict.cpp tqobjectlist.cpp tqpaintdevice.cpp + tqpaintdevicemetrics.cpp tqpainter.cpp tqpair.cpp tqpalette.cpp tqpen.cpp + tqpicture.cpp tqpixmapcache.cpp tqpixmap.cpp tqpngio.cpp tqpointarray.cpp + tqpoint.cpp tqpolygonscanner.cpp tqprinter.cpp tqptrcollection.cpp + tqptrdict.cpp tqptrlist.cpp tqptrqueue.cpp tqptrstack.cpp tqptrvector.cpp + tqrect.cpp tqregexp.cpp tqregion.cpp tqrtlcodec.cpp tqsemaphore.cpp + tqsettings.cpp tqshared.cpp tqsignalslotimp.cpp tqsimplerichtext.cpp tqsize.cpp + tqsizepolicy.cpp tqsjiscodec.cpp tqsocketdevice.cpp tqsortedlist.cpp + tqsqlcursor.cpp tqsqleditorfactory.cpp tqsqlerror.cpp tqsqlfield.cpp + tqsql.cpp tqsqlindex.cpp tqsqlpropertymap.cpp tqsqlrecord.cpp tqsqlresult.cpp + tqsqlselectcursor.cpp tqstring.cpp tqstringlist.cpp tqstrlist.cpp tqstrvec.cpp + tqstylefactory.cpp tqsyntaxhighlighter.cpp tqtextcodecfactory.cpp + tqtextcodec.cpp tqtextstream.cpp tqthread.cpp tqthreadstorage.cpp + tqtl.cpp tqtsciicodec.cpp tqurl.cpp tqurlinfo.cpp tqutfcodec.cpp tquuid.cpp + tqvaluelist.cpp tqvaluestack.cpp tqvaluevector.cpp tqvariant.cpp tqvfbhdr.cpp + tqwaitcondition.cpp tqwhatsthis.cpp tqwidgetfactory.cpp tqwidgetintdict.cpp + tqwidgetlist.cpp tqwmatrix.cpp tqxml.cpp private/tqucomextra_p.cpp + tqlistiterator.cpp + VERSION 4.2.0 + LINK ${QT_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +) diff --git a/qtinterface/TQt.pc.cmake b/qtinterface/TQt.pc.cmake index f7d8786..cb4697a 100644 --- a/qtinterface/TQt.pc.cmake +++ b/qtinterface/TQt.pc.cmake @@ -3,8 +3,13 @@ exec_prefix=@PC_EXEC_PREFIX@ libdir=@PC_LIB_DIR@ includedir=@PC_INCLUDE_DIR@ +tmoc_executable=@BIN_INSTALL_DIR@/tmoc +moc_executable=@MOC_EXECUTABLE@ +uic_executable=@UIC_EXECUTABLE@ + Name: TQt Description: Interface and abstraction library for Qt and Trinity Version: @TQT_VERSION@ -Libs: -L${libdir} -ltqt @PKGCONFIG_QT_LIBRARIES@ -Cflags: @PKGCONFIG_QT_DEFINITIONS@ -I@QT_INCLUDE_DIRS@ -I${includedir} +Libs: -L${libdir} -ltqt -L@QT_LIBRARY_DIR@ @PC_QT_LIBRARIES@ +Cflags: @QT_DEFINITIONS@ -I@QT_INCLUDE_DIR@ -I${includedir} -include tqt.h + diff --git a/qtinterface/tmoc.cmake b/qtinterface/tmoc.cmake index b733f87..087fbdb 100755 --- a/qtinterface/tmoc.cmake +++ b/qtinterface/tmoc.cmake @@ -11,7 +11,7 @@ if [ -f @BIN_INSTALL_DIR@/tqt-replace-stream ]; then input_file="$1" out_file="$3" @BIN_INSTALL_DIR@/tqt-replace-stream "${input_file}" | \ - @QT_MOC_EXECUTABLE@ | \ + @MOC_EXECUTABLE@ | \ sed "/#include <qmetaobject.h>/ i #undef QT_NO_COMPAT\n#include \"${input_file}\"" \ > "${out_file}" fi diff --git a/qtinterface/tqt-replace-stream.cmake b/qtinterface/tqt-replace-stream.cmake index 3267ce6..6f5f352 100755 --- a/qtinterface/tqt-replace-stream.cmake +++ b/qtinterface/tqt-replace-stream.cmake @@ -1,16 +1,16 @@ #!/bin/bash -QT_VER=@QT_VER@ +QT_VERSION=@QT_VERSION@ if [[ $1 == "" ]]; then echo "Usage: tqt-replace-stream <filename>" else - if [[ $QT_VER == 3 ]]; then + if [[ $QT_VERSION == 3 ]]; then cat $1 | \ sed 's/TQ\([^T]\)/Q\1/g' | \ sed 's/TQT\([^_]\)/QT\1/g' fi - if [[ $QT_VER == 4 ]]; then + if [[ $QT_VERSION == 4 ]]; then cat $1 | \ sed 's/TQAccel/Q3Accel/g' | \ sed 's/TQAccessible/QAccessible/g' | \ diff --git a/qtinterface/tqt-replace.cmake b/qtinterface/tqt-replace.cmake index 66c8f57..7f28f05 100755 --- a/qtinterface/tqt-replace.cmake +++ b/qtinterface/tqt-replace.cmake @@ -1,10 +1,10 @@ #!/bin/bash -QT_VER=@QT_VER@ +QT_VERSION=@QT_VERSION@ if [[ $1 == "" ]]; then echo "Usage: tqt-replace <input_file>" else - if [[ $QT_VER == 3 ]]; then + if [[ $QT_VERSION == 3 ]]; then sed -i 's/TQ\([^T]\)/Q\1/g' "$1" sed -i 's/TQT\([^_]\)/QT\1/g' "$1" sed -i 's/Q_SLOTS>/slots>/g' "$1" @@ -12,7 +12,7 @@ else exit 0 fi - if [[ $QT_VER == 4 ]]; then + if [[ $QT_VERSION == 4 ]]; then sed -i 's/TQAccel/Q3Accel/g' "$1" sed -i 's/TQAccessible/QAccessible/g' "$1" sed -i 's/TQAccessibleObject/QAccessibleObject/g' "$1" diff --git a/qtinterface/tqt.h b/qtinterface/tqt.h.cmake index be6bd3f..8908e66 100644 --- a/qtinterface/tqt.h +++ b/qtinterface/tqt.h.cmake @@ -22,7 +22,7 @@ Boston, MA 02110-1301, USA. #ifndef TQT_H #define TQT_H -#define USE_QT3 +#define USE_QT@QT_VERSION@ #ifdef USE_QT4 #define QT3_SUPPORT |