summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindTQt.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindTQt.cmake')
-rw-r--r--cmake/modules/FindTQt.cmake34
1 files changed, 33 insertions, 1 deletions
diff --git a/cmake/modules/FindTQt.cmake b/cmake/modules/FindTQt.cmake
index 018a035..9e7d559 100644
--- a/cmake/modules/FindTQt.cmake
+++ b/cmake/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