summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt83
1 files changed, 25 insertions, 58 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0a338b6..f2a0869 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,11 @@
+############################################
+# #
+# Improvements and feedbacks are welcome #
+# #
+# This file is released under GPL >= 2 #
+# #
+############################################
+
cmake_minimum_required( VERSION 3.1 )
@@ -5,8 +13,6 @@ cmake_minimum_required( VERSION 3.1 )
project( gtk-qt-engine )
-set( PACKAGE gtk-qt-engine )
-
##### include essential cmake modules ###########
@@ -62,63 +68,24 @@ set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined"
set( CMAKE_MODULE_LINKER_FLAGS "${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)
-IF (NOT GTK_INCLUDE_DIR)
- MESSAGE(FATAL_ERROR "GTK was not found. Ensure you have the GTK development libraries installed, and GTK's pkgconfig files are in your pkgconfig search path.")
-ENDIF (NOT GTK_INCLUDE_DIR)
-MESSAGE(STATUS "Found GTK include dir: ${GTK_INCLUDE_DIR}")
-MESSAGE(STATUS "Found GTK library dir: ${GTK_LIB_DIR}")
-
-# Find Bonobo
-PKGCONFIG(libbonoboui-2.0 BONOBO_INCLUDE_DIR BONOBO_LIB_DIR BONOBO_LINK_FLAGS BONOBO_CFLAGS)
-IF (NOT BONOBO_INCLUDE_DIR)
- MESSAGE(STATUS "bonoboui not found. Some features of the theme engine will not work as intended.")
-ELSE (NOT BONOBO_INCLUDE_DIR)
- MESSAGE(STATUS "Found Bonobo include dir: ${BONOBO_INCLUDE_DIR}")
- MESSAGE(STATUS "Found Bonobo library dir: ${BONOBO_LIB_DIR}")
- SET(BONOBO_DEFINITIONS -D HAVE_BONOBO)
-ENDIF (NOT BONOBO_INCLUDE_DIR)
-
-
-# Work out where to install stuff
-EXEC_PROGRAM(
- ${PKGCONFIG_EXECUTABLE}
- ARGS --variable=gtk_binary_version gtk+-2.0
- OUTPUT_VARIABLE GTK_VERSION)
-SET(INSTALL_PATH_GTK_ENGINES "${GTK_LIB_DIR}/gtk-2.0/${GTK_VERSION}/engines" CACHE PATH "The directory in which to install the theme engine library (eg. /usr/lib/gtk-2.0/2.4.0/engines)")
-MESSAGE(STATUS "Installing the GTK theme engine library to: ${INSTALL_PATH_GTK_ENGINES}")
-
-EXEC_PROGRAM(
- ${PKGCONFIG_EXECUTABLE}
- ARGS --variable=prefix gtk+-2.0
- OUTPUT_VARIABLE GTK_PREFIX)
-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 "${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} ${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)
-ADD_SUBDIRECTORY(kcm_gtk)
+##### directories
+
+add_subdirectory( src )
+add_subdirectory( kcm_gtk )
tde_conditional_add_project_docs( BUILD_DOC )
tde_conditional_add_project_translations( BUILD_TRANSLATIONS )
-# Uninstall support
-CONFIGURE_FILE(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET(uninstall
- "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
+##### write configure files
+
+configure_file( config.h.cmake config.h @ONLY )
+
+
+##### uninstall support
+
+if( NOT TARGET uninstall )
+ configure_file( "cmake_uninstall.cmake.in" "cmake_uninstall.cmake" IMMEDIATE @ONLY )
+ add_custom_target( uninstall
+ "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ )
+endif()