#################################################
#
#  (C) 2010-2011 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#  (C) 2011-2012 Timothy Pearson
#  kb9vqf (AT) pearsoncomputing (DOT) net
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

if ( NOT HAVE_REAL_TQT )
  set( IFACE "interface_qt3" )
else ( NOT HAVE_REAL_TQT )
  set( IFACE "interface_tqt3" )
endif ( NOT HAVE_REAL_TQT )

include_directories(
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}/private
  ${QT_INCLUDE_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}/${IFACE}
  ${CMAKE_CURRENT_SOURCE_DIR}/${IFACE}/private
  ${CMAKE_BINARY_DIR}
)

link_directories(
  ${QT_LIBRARY_DIR}
)


##### headers ###################################

configure_file( tqt.h.cmake tqt.h @ONLY )

install( FILES
    ${CMAKE_CURRENT_BINARY_DIR}/tqt.h ${IFACE}/tqtglobaldefines.h ${IFACE}/tqaccel.h ${IFACE}/tqaccessible.h
    ${IFACE}/tqaction.h ${IFACE}/tqapplication.h ${IFACE}/tqasyncio.h ${IFACE}/tqbuttongroup.h ${IFACE}/tqbutton.h ${IFACE}/tqcanvas.h
    ${IFACE}/tqcdestyle.h ${IFACE}/tqcheckbox.h ${IFACE}/tqclipboard.h ${IFACE}/tqcolordialog.h ${IFACE}/tqcombobox.h
    ${IFACE}/tqcommonstyle.h ${IFACE}/tqdatabrowser.h ${IFACE}/tqdatatable.h ${IFACE}/tqdataview.h ${IFACE}/tqdatetimeedit.h
    ${IFACE}/tqdesktopwidget.h ${IFACE}/tqdial.h ${IFACE}/tqdialog.h ${IFACE}/tqdns.h ${IFACE}/tqdockarea.h ${IFACE}/tqdockwindow.h
    ${IFACE}/tqdragobject.h ${IFACE}/tqerrormessage.h ${IFACE}/tqeventloop.h ${IFACE}/tqfiledialog.h ${IFACE}/tqfontdialog.h
    ${IFACE}/tqframe.h ${IFACE}/tqftp.h ${IFACE}/tqgl.h ${IFACE}/tqgplugin.h ${IFACE}/tqgrid.h ${IFACE}/tqgridview.h ${IFACE}/tqgroupbox.h
    ${IFACE}/tqguardedptr.h ${IFACE}/tqhbox.h ${IFACE}/tqhbuttongroup.h ${IFACE}/tqheader.h ${IFACE}/tqhgroupbox.h
    ${IFACE}/tqhttp.h ${IFACE}/tqiconview.h ${IFACE}/tqimageformatplugin.h ${IFACE}/tqinputdialog.h ${IFACE}/tqlabel.h
    ${IFACE}/tqlayout.h ${IFACE}/tqlcdnumber.h ${IFACE}/tqlineedit.h ${IFACE}/tqlistbox.h ${IFACE}/tqlistview.h ${IFACE}/tqlocalfs.h
    ${IFACE}/tqmainwindow.h ${IFACE}/tqmenubar.h ${IFACE}/tqmessagebox.h ${IFACE}/tqmotifplusstyle.h ${IFACE}/tqmotifstyle.h
    ${IFACE}/tqmultilineedit.h ${IFACE}/tqnetworkprotocol.h ${IFACE}/tqnp.h ${IFACE}/tqobjectcleanuphandler.h
    ${IFACE}/tqobject.h ${IFACE}/tqplatinumstyle.h ${IFACE}/tqpopupmenu.h ${IFACE}/tqprintdialog.h ${IFACE}/tqprocess.h
    ${IFACE}/tqprogressbar.h ${IFACE}/tqprogressdialog.h ${IFACE}/tqpushbutton.h ${IFACE}/tqradiobutton.h
    ${IFACE}/tqrangecontrol.h ${IFACE}/tqscrollbar.h ${IFACE}/tqscrollview.h ${IFACE}/tqsemimodal.h ${IFACE}/tqserversocket.h
    ${IFACE}/tqsessionmanager.h ${IFACE}/tqsgistyle.h ${IFACE}/tqsignal.h ${IFACE}/tqsignalmapper.h ${IFACE}/tqsizegrip.h
    ${IFACE}/tqslider.h ${IFACE}/tqsocket.h ${IFACE}/tqsocketnotifier.h ${IFACE}/tqsound.h ${IFACE}/tqspinbox.h ${IFACE}/tqsplashscreen.h
    ${IFACE}/tqsplitter.h ${IFACE}/tqsqldatabase.h ${IFACE}/tqsqldriver.h ${IFACE}/tqsqldriverplugin.h ${IFACE}/tqsqlform.h
    ${IFACE}/tqsqlquery.h ${IFACE}/tqstatusbar.h ${IFACE}/tqstyle.h ${IFACE}/tqstyleplugin.h ${IFACE}/tqstylesheet.h ${IFACE}/tqtabbar.h
    ${IFACE}/tqtabdialog.h ${IFACE}/tqtable.h ${IFACE}/tqtabwidget.h ${IFACE}/tqtextbrowser.h ${IFACE}/tqtextcodecplugin.h
    ${IFACE}/tqtextedit.h ${IFACE}/tqtextview.h ${IFACE}/tqtimer.h ${IFACE}/tqtoolbar.h ${IFACE}/tqtoolbox.h ${IFACE}/tqtoolbutton.h
    ${IFACE}/tqtooltip.h ${IFACE}/tqtranslator.h ${IFACE}/tqurloperator.h ${IFACE}/tqvalidator.h ${IFACE}/tqvbox.h
    ${IFACE}/tqvbuttongroup.h ${IFACE}/tqvgroupbox.h ${IFACE}/tqwidget.h ${IFACE}/tqwidgetplugin.h ${IFACE}/tqwidgetstack.h
    ${IFACE}/tqwindowsstyle.h ${IFACE}/tqwizard.h ${IFACE}/tqworkspace.h ${IFACE}/tqapp.h ${IFACE}/tqarray.h ${IFACE}/tqassistantclient.h
    ${IFACE}/tqbitarry.h ${IFACE}/tqbttngrp.h ${IFACE}/tqchkbox.h ${IFACE}/tqclipbrd.h ${IFACE}/tqcollect.h ${IFACE}/tqcollection.h ${IFACE}/tqcombo.h
    ${IFACE}/tqconfig.h ${IFACE}/tqconnect.h ${IFACE}/tqdatetm.h ${IFACE}/tqdrawutl.h ${IFACE}/tqdstream.h ${IFACE}/tqfeatures.h
    ${IFACE}/tqfiledef.h ${IFACE}/tqfiledlg.h ${IFACE}/tqfileinf.h ${IFACE}/tqfontinf.h ${IFACE}/tqfontmet.h ${IFACE}/tqgbkcodec.h
    ${IFACE}/tqgeneric.h ${IFACE}/tqgif.h ${IFACE}/tqglobal.h ${IFACE}/tqgrpbox.h ${IFACE}/tqintcach.h ${IFACE}/tqiodev.h ${IFACE}/tqjpegio.h
    ${IFACE}/tqkeycode.h ${IFACE}/tqlined.h ${IFACE}/tqlist.h ${IFACE}/tqmenudta.h ${IFACE}/tqmetaobj.h ${IFACE}/tqmlined.h ${IFACE}/tqmngio.h
    ${IFACE}/tqmodules.h ${IFACE}/tqmsgbox.h ${IFACE}/tqmultilinedit.h ${IFACE}/tqnetwork.h ${IFACE}/tqobjcoll.h ${IFACE}/tqobjdefs.h
    ${IFACE}/tqpaintdc.h ${IFACE}/tqpaintd.h ${IFACE}/tqpdevmet.h ${IFACE}/tqpmcache.h ${IFACE}/tqpntarry.h ${IFACE}/tqpopmenu.h
    ${IFACE}/tqprndlg.h ${IFACE}/tqprogbar.h ${IFACE}/tqprogdlg.h ${IFACE}/tqpushbt.h ${IFACE}/tqqueue.h ${IFACE}/tqradiobt.h ${IFACE}/tqrangect.h
    ${IFACE}/tqscrbar.h ${IFACE}/tqsession.h ${IFACE}/tqsocknot.h ${IFACE}/tqstack.h ${IFACE}/tqtabdlg.h ${IFACE}/tqtstream.h ${IFACE}/tqvector.h
    ${IFACE}/tqwidcoll.h ${IFACE}/tqwindefs.h ${IFACE}/tqwindowdefs.h ${IFACE}/tqwinexport.h ${IFACE}/tq1xcompatibility.h
    ${IFACE}/tqabstractlayout.h ${IFACE}/tqasciicache.h ${IFACE}/tqasciidict.h ${IFACE}/tqasyncimageio.h ${IFACE}/tqbig5codec.h
    ${IFACE}/tqbitarray.h ${IFACE}/tqbitmap.h ${IFACE}/tqbrush.h ${IFACE}/tqbuffer.h ${IFACE}/tqcache.h ${IFACE}/tqcleanuphandler.h
    ${IFACE}/tqcolor.h ${IFACE}/tqcompactstyle.h ${IFACE}/tqconnection.h ${IFACE}/tqcstring.h ${IFACE}/tqcursor.h ${IFACE}/tqdatastream.h
    ${IFACE}/tqdatetime.h ${IFACE}/tqdeepcopy.h ${IFACE}/tqdict.h ${IFACE}/tqdir.h ${IFACE}/tqdom.h ${IFACE}/tqdrawutil.h ${IFACE}/tqdropsite.h
    ${IFACE}/tqeditorfactory.h ${IFACE}/tqeucjpcodec.h ${IFACE}/tqeuckrcodec.h ${IFACE}/tqevent.h ${IFACE}/tqfile.h ${IFACE}/tqfileinfo.h
    ${IFACE}/tqfocusdata.h ${IFACE}/tqfontdatabase.h ${IFACE}/tqfont.h ${IFACE}/tqfontinfo.h ${IFACE}/tqfontmetrics.h
    ${IFACE}/tqgarray.h ${IFACE}/tqgb18030codec.h ${IFACE}/tqgcache.h ${IFACE}/tqgdict.h ${IFACE}/tqglcolormap.h ${IFACE}/tqglist.h
    ${IFACE}/tqgvector.h ${IFACE}/tqhostaddress.h ${IFACE}/tqiconset.h ${IFACE}/tqimage.h ${IFACE}/tqintcache.h ${IFACE}/tqintdict.h
    ${IFACE}/tqinterlacestyle.h ${IFACE}/tqiodevice.h ${IFACE}/tqjiscodec.h ${IFACE}/tqjpunicode.h ${IFACE}/tqkeysequence.h
    ${IFACE}/tqlibrary.h ${IFACE}/tqlocale.h ${IFACE}/tqmap.h ${IFACE}/tqmemarray.h ${IFACE}/tqmenudata.h ${IFACE}/tqmetaobject.h
    ${IFACE}/tqmime.h ${IFACE}/tqmovie.h ${IFACE}/tqmutex.h ${IFACE}/tqnamespace.h ${IFACE}/tqobjectdict.h ${IFACE}/tqobjectlist.h
    ${IFACE}/tqpaintdevice.h ${IFACE}/tqpaintdevicemetrics.h ${IFACE}/tqpainter.h ${IFACE}/tqpair.h ${IFACE}/tqpalette.h ${IFACE}/tqpen.h
    ${IFACE}/tqpicture.h ${IFACE}/tqpixmapcache.h ${IFACE}/tqpixmap.h ${IFACE}/tqpngio.h ${IFACE}/tqpointarray.h ${IFACE}/tqpoint.h
    ${IFACE}/tqpolygonscanner.h ${IFACE}/tqprinter.h ${IFACE}/tqptrcollection.h ${IFACE}/tqptrdict.h ${IFACE}/tqptrlist.h
    ${IFACE}/tqptrqueue.h ${IFACE}/tqptrstack.h ${IFACE}/tqptrvector.h ${IFACE}/tqrect.h ${IFACE}/tqregexp.h ${IFACE}/tqregion.h
    ${IFACE}/tqrtlcodec.h ${IFACE}/tqsemaphore.h ${IFACE}/tqsettings.h ${IFACE}/tqshared.h ${IFACE}/tqsignalslotimp.h
    ${IFACE}/tqsimplerichtext.h ${IFACE}/tqsize.h ${IFACE}/tqsizepolicy.h ${IFACE}/tqsjiscodec.h ${IFACE}/tqsocketdevice.h
    ${IFACE}/tqsortedlist.h ${IFACE}/tqsqlcursor.h ${IFACE}/tqsqleditorfactory.h ${IFACE}/tqsqlerror.h ${IFACE}/tqsqlfield.h
    ${IFACE}/tqsql.h ${IFACE}/tqsqlindex.h ${IFACE}/tqsqlpropertymap.h ${IFACE}/tqsqlrecord.h ${IFACE}/tqsqlresult.h
    ${IFACE}/tqsqlselectcursor.h ${IFACE}/tqstring.h ${IFACE}/tqstringlist.h ${IFACE}/tqstrlist.h ${IFACE}/tqstrvec.h
    ${IFACE}/tqstylefactory.h ${IFACE}/tqsyntaxhighlighter.h ${IFACE}/tqtextcodecfactory.h ${IFACE}/tqtextcodec.h
    ${IFACE}/tqtextstream.h ${IFACE}/tqthread.h ${IFACE}/tqthreadstorage.h ${IFACE}/tqtl.h ${IFACE}/tqtsciicodec.h ${IFACE}/tqurl.h
    ${IFACE}/tqurlinfo.h ${IFACE}/tqutfcodec.h ${IFACE}/tquuid.h ${IFACE}/tqvaluelist.h ${IFACE}/tqvaluestack.h ${IFACE}/tqvaluevector.h
    ${IFACE}/tqvariant.h ${IFACE}/tqvfbhdr.h ${IFACE}/tqwaitcondition.h ${IFACE}/tqwhatsthis.h ${IFACE}/tqwidgetfactory.h
    ${IFACE}/tqwidgetintdict.h ${IFACE}/tqwidgetlist.h ${IFACE}/tqwmatrix.h ${IFACE}/tqxml.h ${IFACE}/private/tqucomextra_p.h
    ${IFACE}/private/tqlayoutengine_p.h ${IFACE}/private/tqinternal_p.h ${IFACE}/private/tqeffects_p.h
    ${IFACE}/private/tqrichtext_p.h ${IFACE}/private/tqpluginmanager_p.h ${IFACE}/private/tqcom_p.h
    ${IFACE}/private/tqucom_p.h ${IFACE}/private/tqwidgetinterface_p.h ${IFACE}/private/tqtextengine_p.h
    ${IFACE}/tqlistiterator.h
  DESTINATION ${INCLUDE_INSTALL_DIR} )

install(
  DIRECTORY tqt4/Qt
  DESTINATION ${INCLUDE_INSTALL_DIR}
  PATTERN ".svn" EXCLUDE )


##### tqt tools #################################

configure_file( ${IFACE}/tmoc.cmake tmoc @ONLY )
configure_file( uic-tqt.cmake uic-tqt @ONLY )
if ( NOT HAVE_REAL_TQT )
  configure_file( tqt-replace.cmake tqt-replace @ONLY )
  configure_file( tqt-replace-stream.cmake tqt-replace-stream @ONLY )
else ()
  configure_file( tqt-replace-tqt3.cmake tqt-replace @ONLY )
  configure_file( tqt-replace-stream-tqt3.cmake tqt-replace-stream @ONLY )
endif ()

install( PROGRAMS
    moc-tqt ${CMAKE_CURRENT_BINARY_DIR}/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 )
configure_file( tqtqui.pc.cmake tqtqui.pc @ONLY )

install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tqt.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tqtqui.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )


##### tqt (shared) ##############################


tde_add_library( tqt SHARED
  SOURCES
    ${IFACE}/tqt.cpp ${IFACE}/tqaccel.cpp ${IFACE}/tqaccessible.cpp ${IFACE}/tqaction.cpp ${IFACE}/tqapplication.cpp
    ${IFACE}/tqasyncio.cpp ${IFACE}/tqbuttongroup.cpp ${IFACE}/tqbutton.cpp ${IFACE}/tqcanvas.cpp ${IFACE}/tqcdestyle.cpp
    ${IFACE}/tqcheckbox.cpp ${IFACE}/tqclipboard.cpp ${IFACE}/tqcolordialog.cpp ${IFACE}/tqcombobox.cpp
    ${IFACE}/tqcommonstyle.cpp ${IFACE}/tqdatabrowser.cpp ${IFACE}/tqdatatable.cpp ${IFACE}/tqdataview.cpp
    ${IFACE}/tqdatetimeedit.cpp ${IFACE}/tqdesktopwidget.cpp ${IFACE}/tqdial.cpp ${IFACE}/tqdialog.cpp ${IFACE}/tqdns.cpp
    ${IFACE}/tqdockarea.cpp ${IFACE}/tqdockwindow.cpp ${IFACE}/tqdragobject.cpp ${IFACE}/tqerrormessage.cpp
    ${IFACE}/tqeventloop.cpp ${IFACE}/tqframe.cpp ${IFACE}/tqftp.cpp ${IFACE}/tqfiledialog.cpp ${IFACE}/tqfontdialog.cpp
    ${IFACE}/tqgl.cpp ${IFACE}/tqgplugin.cpp ${IFACE}/tqgrid.cpp ${IFACE}/tqgridview.cpp ${IFACE}/tqgroupbox.cpp
    ${IFACE}/tqguardedptr.cpp ${IFACE}/tqhbox.cpp ${IFACE}/tqhbuttongroup.cpp ${IFACE}/tqheader.cpp
    ${IFACE}/tqhgroupbox.cpp ${IFACE}/tqhttp.cpp ${IFACE}/tqiconview.cpp ${IFACE}/tqimageformatplugin.cpp
    ${IFACE}/tqinputdialog.cpp ${IFACE}/tqlabel.cpp ${IFACE}/tqlayout.cpp ${IFACE}/tqlcdnumber.cpp ${IFACE}/tqlineedit.cpp
    ${IFACE}/tqlistbox.cpp ${IFACE}/tqlistview.cpp ${IFACE}/tqlocalfs.cpp ${IFACE}/tqmainwindow.cpp ${IFACE}/tqmenubar.cpp
    ${IFACE}/tqmessagebox.cpp ${IFACE}/tqmotifplusstyle.cpp ${IFACE}/tqmotifstyle.cpp ${IFACE}/tqmultilineedit.cpp
    ${IFACE}/tqnetworkprotocol.cpp ${IFACE}/tqnp.cpp ${IFACE}/tqobjectcleanuphandler.cpp ${IFACE}/tqobject.cpp
    ${IFACE}/tqplatinumstyle.cpp ${IFACE}/tqpopupmenu.cpp ${IFACE}/tqprintdialog.cpp ${IFACE}/tqprocess.cpp
    ${IFACE}/tqprogressbar.cpp ${IFACE}/tqprogressdialog.cpp ${IFACE}/tqpushbutton.cpp ${IFACE}/tqradiobutton.cpp
    ${IFACE}/tqrangecontrol.cpp ${IFACE}/tqscrollbar.cpp ${IFACE}/tqscrollview.cpp ${IFACE}/tqsemimodal.cpp
    ${IFACE}/tqserversocket.cpp ${IFACE}/tqsessionmanager.cpp ${IFACE}/tqsgistyle.cpp ${IFACE}/tqsignal.cpp
    ${IFACE}/tqsignalmapper.cpp ${IFACE}/tqsizegrip.cpp ${IFACE}/tqslider.cpp ${IFACE}/tqsocket.cpp
    ${IFACE}/tqsocketnotifier.cpp ${IFACE}/tqsound.cpp ${IFACE}/tqspinbox.cpp ${IFACE}/tqsplashscreen.cpp
    ${IFACE}/tqsplitter.cpp ${IFACE}/tqsqldatabase.cpp ${IFACE}/tqsqldriver.cpp ${IFACE}/tqsqldriverplugin.cpp
    ${IFACE}/tqsqlform.cpp ${IFACE}/tqsqlquery.cpp ${IFACE}/tqstatusbar.cpp ${IFACE}/tqstyle.cpp ${IFACE}/tqstyleplugin.cpp
    ${IFACE}/tqstylesheet.cpp ${IFACE}/tqtabbar.cpp ${IFACE}/tqtabdialog.cpp ${IFACE}/tqtable.cpp ${IFACE}/tqtabwidget.cpp
    ${IFACE}/tqtextbrowser.cpp ${IFACE}/tqtextcodecplugin.cpp ${IFACE}/tqtextedit.cpp ${IFACE}/tqtextview.cpp
    ${IFACE}/tqtimer.cpp ${IFACE}/tqtoolbar.cpp ${IFACE}/tqtoolbox.cpp ${IFACE}/tqtoolbutton.cpp ${IFACE}/tqtooltip.cpp
    ${IFACE}/tqtranslator.cpp ${IFACE}/tqurloperator.cpp ${IFACE}/tqvalidator.cpp ${IFACE}/tqvbox.cpp
    ${IFACE}/tqvbuttongroup.cpp ${IFACE}/tqvgroupbox.cpp ${IFACE}/tqwidget.cpp ${IFACE}/tqwidgetplugin.cpp
    ${IFACE}/tqwidgetstack.cpp ${IFACE}/tqwindowsstyle.cpp ${IFACE}/tqwizard.cpp ${IFACE}/tqworkspace.cpp
    ${IFACE}/tq1xcompatibility.cpp ${IFACE}/tqabstractlayout.cpp ${IFACE}/tqasciicache.cpp ${IFACE}/tqasciidict.cpp
    ${IFACE}/tqasyncimageio.cpp ${IFACE}/tqbig5codec.cpp ${IFACE}/tqbitarray.cpp ${IFACE}/tqbitmap.cpp ${IFACE}/tqbrush.cpp
    ${IFACE}/tqbuffer.cpp ${IFACE}/tqcache.cpp ${IFACE}/tqcleanuphandler.cpp ${IFACE}/tqcolor.cpp ${IFACE}/tqcompactstyle.cpp
    ${IFACE}/tqconnection.cpp ${IFACE}/tqcstring.cpp ${IFACE}/tqcursor.cpp ${IFACE}/tqdatastream.cpp ${IFACE}/tqdatetime.cpp
    ${IFACE}/tqdeepcopy.cpp ${IFACE}/tqdict.cpp ${IFACE}/tqdir.cpp ${IFACE}/tqdom.cpp ${IFACE}/tqdrawutil.cpp ${IFACE}/tqdropsite.cpp
    ${IFACE}/tqeditorfactory.cpp ${IFACE}/tqeucjpcodec.cpp ${IFACE}/tqeuckrcodec.cpp ${IFACE}/tqevent.cpp ${IFACE}/tqfile.cpp
    ${IFACE}/tqfileinfo.cpp ${IFACE}/tqfocusdata.cpp ${IFACE}/tqfontdatabase.cpp ${IFACE}/tqfont.cpp ${IFACE}/tqfontinfo.cpp
    ${IFACE}/tqfontmetrics.cpp ${IFACE}/tqgarray.cpp ${IFACE}/tqgb18030codec.cpp ${IFACE}/tqgcache.cpp ${IFACE}/tqgdict.cpp
    ${IFACE}/tqglcolormap.cpp ${IFACE}/tqglist.cpp ${IFACE}/tqgvector.cpp ${IFACE}/tqhostaddress.cpp ${IFACE}/tqiconset.cpp
    ${IFACE}/tqimage.cpp ${IFACE}/tqintcache.cpp ${IFACE}/tqintdict.cpp ${IFACE}/tqinterlacestyle.cpp ${IFACE}/tqiodevice.cpp
    ${IFACE}/tqjiscodec.h ${IFACE}/tqjpunicode.cpp ${IFACE}/tqkeysequence.cpp ${IFACE}/tqlibrary.cpp ${IFACE}/tqlocale.cpp
    ${IFACE}/tqmap.cpp ${IFACE}/tqmemarray.cpp ${IFACE}/tqmenudata.cpp ${IFACE}/tqmetaobject.cpp ${IFACE}/tqmime.cpp ${IFACE}/tqmovie.cpp
    ${IFACE}/tqmutex.cpp ${IFACE}/tqnamespace.cpp ${IFACE}/tqobjectdict.cpp ${IFACE}/tqobjectlist.cpp ${IFACE}/tqpaintdevice.cpp
    ${IFACE}/tqpaintdevicemetrics.cpp ${IFACE}/tqpainter.cpp ${IFACE}/tqpair.cpp ${IFACE}/tqpalette.cpp ${IFACE}/tqpen.cpp
    ${IFACE}/tqpicture.cpp ${IFACE}/tqpixmapcache.cpp ${IFACE}/tqpixmap.cpp ${IFACE}/tqpngio.cpp ${IFACE}/tqpointarray.cpp
    ${IFACE}/tqpoint.cpp ${IFACE}/tqpolygonscanner.cpp ${IFACE}/tqprinter.cpp ${IFACE}/tqptrcollection.cpp
    ${IFACE}/tqptrdict.cpp ${IFACE}/tqptrlist.cpp ${IFACE}/tqptrqueue.cpp ${IFACE}/tqptrstack.cpp ${IFACE}/tqptrvector.cpp
    ${IFACE}/tqrect.cpp ${IFACE}/tqregexp.cpp ${IFACE}/tqregion.cpp ${IFACE}/tqrtlcodec.cpp ${IFACE}/tqsemaphore.cpp
    ${IFACE}/tqsettings.cpp ${IFACE}/tqshared.cpp ${IFACE}/tqsignalslotimp.cpp ${IFACE}/tqsimplerichtext.cpp ${IFACE}/tqsize.cpp
    ${IFACE}/tqsizepolicy.cpp ${IFACE}/tqsjiscodec.cpp ${IFACE}/tqsocketdevice.cpp ${IFACE}/tqsortedlist.cpp
    ${IFACE}/tqsqlcursor.cpp ${IFACE}/tqsqleditorfactory.cpp ${IFACE}/tqsqlerror.cpp ${IFACE}/tqsqlfield.cpp
    ${IFACE}/tqsql.cpp ${IFACE}/tqsqlindex.cpp ${IFACE}/tqsqlpropertymap.cpp ${IFACE}/tqsqlrecord.cpp ${IFACE}/tqsqlresult.cpp
    ${IFACE}/tqsqlselectcursor.cpp ${IFACE}/tqstring.cpp ${IFACE}/tqstringlist.cpp ${IFACE}/tqstrlist.cpp ${IFACE}/tqstrvec.cpp
    ${IFACE}/tqstylefactory.cpp ${IFACE}/tqsyntaxhighlighter.cpp ${IFACE}/tqtextcodecfactory.cpp
    ${IFACE}/tqtextcodec.cpp ${IFACE}/tqtextstream.cpp ${IFACE}/tqthread.cpp ${IFACE}/tqthreadstorage.cpp
    ${IFACE}/tqtl.cpp ${IFACE}/tqtsciicodec.cpp ${IFACE}/tqurl.cpp ${IFACE}/tqurlinfo.cpp ${IFACE}/tqutfcodec.cpp ${IFACE}/tquuid.cpp
    ${IFACE}/tqvaluelist.cpp ${IFACE}/tqvaluestack.cpp ${IFACE}/tqvaluevector.cpp ${IFACE}/tqvariant.cpp ${IFACE}/tqvfbhdr.cpp
    ${IFACE}/tqwaitcondition.cpp ${IFACE}/tqwhatsthis.cpp ${IFACE}/tqwidgetfactory.cpp ${IFACE}/tqwidgetintdict.cpp
    ${IFACE}/tqwidgetlist.cpp ${IFACE}/tqwmatrix.cpp ${IFACE}/tqxml.cpp ${IFACE}/private/tqucomextra_p.cpp
    ${IFACE}/tqlistiterator.cpp
  VERSION 4.2.0
  LINK ${QT_LIBRARIES}
  DESTINATION ${LIB_INSTALL_DIR}
)

##### tqassistantclient (shared) ##############################

if ( NOT HAVE_REAL_TQT )

  find_library( QASSISTANTCLIENT_STATIC libqassistantclient.a )

  if ( QASSISTANTCLIENT_STATIC )

    add_library(qassistantclient STATIC IMPORTED)
    set_property(TARGET qassistantclient PROPERTY
                 IMPORTED_LOCATION ${QASSISTANTCLIENT_STATIC})

    tde_add_library( tqassistantclient SHARED
      SOURCES
        ${IFACE}/tqassistantclient.cpp
      VERSION 4.2.0
      LINK ${QT_LIBRARIES}
      EMBED qassistantclient
      DESTINATION ${LIB_INSTALL_DIR}
    )

  else ( QASSISTANTCLIENT_STATIC )

    tde_add_library( tqassistantclient SHARED
      SOURCES
        ${IFACE}/tqassistantclient.cpp
      VERSION 4.2.0
      LINK ${QT_LIBRARIES} -lqassistantclient
      DESTINATION ${LIB_INSTALL_DIR}
    )

  endif ( QASSISTANTCLIENT_STATIC )

endif ( NOT HAVE_REAL_TQT )
