Browse Source

[cmake] reworked tqtinterface build system

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1226235 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
samelian 11 years ago
parent
commit
e70558cf0a
  1. 755
      CMakeLists.txt
  2. 182
      ConfigureChecks.cmake
  3. 195
      qtinterface/CMakeLists.txt
  4. 9
      qtinterface/TQt.pc.cmake
  5. 2
      qtinterface/tmoc.cmake
  6. 6
      qtinterface/tqt-replace-stream.cmake
  7. 6
      qtinterface/tqt-replace.cmake
  8. 2
      qtinterface/tqt.h.cmake

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

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

195
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
tqses<