diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-03-20 23:07:33 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-03-20 23:07:33 +0000 |
commit | 8d2dffbc5fa1db9140508cb9bbf7ce87b976e455 (patch) | |
tree | 3f2f7072d17560634ed3c325472b65ef28548d6e /modules/FindTQt.cmake | |
parent | 9a8f200e3dca48164fbf2e1fd3019a76b63c9a28 (diff) | |
download | tde-cmake-8d2dffbc5fa1db9140508cb9bbf7ce87b976e455.tar.gz tde-cmake-8d2dffbc5fa1db9140508cb9bbf7ce87b976e455.zip |
Add preliminary support for TQt for Qt4 to CMake
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common/cmake@1225433 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'modules/FindTQt.cmake')
-rw-r--r-- | modules/FindTQt.cmake | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/modules/FindTQt.cmake b/modules/FindTQt.cmake index 018a035..9e7d559 100644 --- a/modules/FindTQt.cmake +++ b/modules/FindTQt.cmake @@ -9,12 +9,44 @@ # ################################################# +if( WITH_QT4 ) + +pkg_search_module( TQT tqt ) + +if( NOT TQT_FOUND ) + tde_message_fatal( "Unable to find TQt for Qt4!\n Try adding the directory in which the tqt.pc file is located\nto the PKG_CONFIG_PATH variable." ) +endif() + +# under Qt4 the standard moc is used +if( NOT TQT_TMOC_EXECUTABLE ) + find_program( TQT_TMOC_EXECUTABLE + NAMES moc + HINTS ${TQTDIR}/bin $ENV{TQTDIR}/bin + PATHS ${BINDIR} ) +endif( NOT TQT_TMOC_EXECUTABLE ) + +if ( TQT_LIBRARIES ) + set( TQT_LIBRARIES "${TQT_LIBRARIES} -lQtCore -lQtGui" CACHE INTERNAL TQT_LIBRARIES FORCE ) +else ( TQT_LIBRARIES ) + set( TQT_LIBRARIES "QtCore -lQtGui" CACHE INTERNAL TQT_LIBRARIES FORCE ) +endif ( TQT_LIBRARIES ) + +endif( WITH_QT4 ) + +if( WITH_QT3 ) + pkg_search_module( TQT TQt ) -# find tmoc, a simple TQt wrapper over moc +if( NOT TQT_FOUND ) + tde_message_fatal( "Unable to find TQt for Qt3!\n Try adding the directory in which the TQt.pc file is located\nto the PKG_CONFIG_PATH variable." ) +endif() + +# for Qt3, find tmoc, a simple TQt wrapper around the standard moc if( NOT TQT_TMOC_EXECUTABLE ) find_program( TQT_TMOC_EXECUTABLE NAMES tmoc HINTS ${TQTDIR}/bin $ENV{TQTDIR}/bin PATHS ${BINDIR} ) endif( NOT TQT_TMOC_EXECUTABLE ) + +endif( WITH_QT3 )
\ No newline at end of file |