diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-05 03:50:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-05 03:50:29 +0000 |
commit | 5cf5e6b8214ace7beb2836bce2f2b3e3324222ca (patch) | |
tree | 379e5636d96beeaa73a73fd1824b6ba2975d088e /CMakeLists.txt | |
parent | b739bb3004a7aa23de0f9f5360011e81cd2f7b54 (diff) | |
download | gtk-qt-engine-5cf5e6b8214ace7beb2836bce2f2b3e3324222ca.tar.gz gtk-qt-engine-5cf5e6b8214ace7beb2836bce2f2b3e3324222ca.zip |
Migrate gtk-qt-trinity to new CMake system (mostly)
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gtk-qt-engine@1230450 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 77 |
1 files changed, 53 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 55d50a8..4d7b8ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,21 +1,56 @@ -PROJECT (gtk-qt-engine) -INCLUDE (UsePkgConfig) +cmake_minimum_required( VERSION 2.8 ) + + +##### general package setup ##################### + +project( gtk-qt-engine ) + +set( PACKAGE gtk-qt-engine ) +set( VERSION "3.5.13" ) + + +##### include essential cmake modules ########### + +include( FindPkgConfig ) +include( CheckIncludeFile ) +include( CheckCSourceRuns ) +include( CheckCXXSourceCompiles ) +include( CheckLibraryExists ) +include( CheckFunctionExists ) +include( CheckStructHasMember ) + +##### include our cmake modules ################# + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) +include( TDEMacros ) + + +##### setup install paths ####################### -# Find KDE -FIND_PACKAGE(KDE3 REQUIRED) +include( TDESetupPaths ) +tde_setup_paths( ) -# Find Qt -FIND_PACKAGE(Qt3) -MESSAGE(STATUS "Found Qt library: ${QT_QT_LIBRARY}") +##### set PKG_CONFIG_PATH ####################### -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( ENV{PKG_CONFIG_PATH} "${PKG_CONFIG_PATH}:$ENV{PKG_CONFIG_PATH}:${LIB_INSTALL_DIR}/pkgconfig" ) -SET(QT_UIC_EXECUTABLE "/usr/bin/uic-tqt") -SET(QT_MOC_EXECUTABLE "/usr/bin/tmoc") + +##### configure checks ########################## + +include( ConfigureChecks.cmake ) + + +###### global compiler settings ################# + +add_definitions( + -DHAVE_CONFIG_H +) + +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) +set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) +set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) + +INCLUDE (UsePkgConfig) # Find GTK PKGCONFIG(gtk+-2.0 GTK_INCLUDE_DIR GTK_LIB_DIR GTK_LINK_FLAGS GTK_CFLAGS) @@ -78,21 +113,15 @@ EXEC_PROGRAM( SET(INSTALL_PATH_GTK_THEMES "${GTK_PREFIX}/share/themes" CACHE PATH "The directory in which to install the theme data (eg. /usr/share/themes)") MESSAGE(STATUS "Installing the GTK theme engine data to: ${INSTALL_PATH_GTK_THEMES}") -SET(INSTALL_PATH_KCONTROL_MODULES "${KDE3_LIB_DIR}" CACHE PATH "The directory in which to install KControl plugins (eg. /usr/lib)") +SET(INSTALL_PATH_KCONTROL_MODULES "${TDE_LIB_DIR}" CACHE PATH "The directory in which to install KControl plugins (eg. /usr/lib)") MESSAGE(STATUS "Installing the KControl plugins to: ${INSTALL_PATH_KCONTROL_MODULES}") MESSAGE(STATUS "Installing everything else to: ${CMAKE_INSTALL_PREFIX}") # Setup definitions and directories to be used in all subdirectories -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") +ADD_DEFINITIONS(${QT_DEFINITIONS} ${TDE_DEFINITIONS} ${BONOBO_DEFINITIONS}) +LINK_DIRECTORIES(${TDE_LIB_DIR} ${GTK_LIB_DIR} ${BONOBO_LIB_DIR} ${TQT_LIBRARY_DIRS}) +INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIR} ${BONOBO_INCLUDE_DIR} ${TDE_INCLUDE_DIR} ${TQT_INCLUDE_DIRS}) # Subdirectories ADD_SUBDIRECTORY(src) |