From b739bb3004a7aa23de0f9f5360011e81cd2f7b54 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 5 May 2011 03:02:35 +0000 Subject: [PATCH] Start fixing up CMake for gtk-qt-engine git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gtk-qt-engine@1230445 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- CMakeLists.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd85e91..55d50a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,9 +5,18 @@ INCLUDE (UsePkgConfig) FIND_PACKAGE(KDE3 REQUIRED) # Find Qt -FIND_PACKAGE(Qt3 REQUIRED) +FIND_PACKAGE(Qt3) MESSAGE(STATUS "Found Qt library: ${QT_QT_LIBRARY}") +IF(QT_FOUND) +ELSE(QT_FOUND) + MESSAGE(STATUS_ERROR "Qt3 package not found--assuming TQt4") + SET(QT_INCLUDE_DIR "/usr/include/qt4") +ENDIF(QT_FOUND) + +SET(QT_UIC_EXECUTABLE "/usr/bin/uic-tqt") +SET(QT_MOC_EXECUTABLE "/usr/bin/tmoc") + # Find GTK PKGCONFIG(gtk+-2.0 GTK_INCLUDE_DIR GTK_LIB_DIR GTK_LINK_FLAGS GTK_CFLAGS) IF (NOT GTK_INCLUDE_DIR) @@ -79,6 +88,12 @@ ADD_DEFINITIONS(${QT_DEFINITIONS} ${KDE3_DEFINITIONS} ${BONOBO_DEFINITIONS}) LINK_DIRECTORIES(${KDE3_LIB_DIR} ${GTK_LIB_DIR} ${BONOBO_LIB_DIR}) INCLUDE_DIRECTORIES(${KDE3_INCLUDE_DIRS} ${GTK_INCLUDE_DIR} ${BONOBO_INCLUDE_DIR}) +SET(QT_UIC_EXECUTABLE "/usr/bin/uic-tqt") +SET(QT_MOC_EXECUTABLE "/usr/bin/tmoc") + +# Setup CXX flags +SET(CMAKE_CXX_FLAGS "-I/usr/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT") + # Subdirectories ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(kcm_gtk)