################################################# # # (C) 2010 Serghei Amelian # serghei (DOT) amelian (AT) gmail.com # # Improvements and feedback are welcome # # This file is released under GPL >= 2 # ################################################# 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_VERSION "${TQT_MAJOR_VERSION}.${TQT_MINOR_VERSION}.${TQT_MICRO_VERSION}" ) ##### include essential cmake modules ########### include( FindPkgConfig ) include( CheckCXXSourceCompiles ) ##### include our cmake modules ################# set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) include( TDEMacros ) ##### 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} ) configure_file( qtinterface/TQt.pc.cmake qtinterface/TQt.pc @ONLY ) ##### install ################################### 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 )