summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt89
-rw-r--r--ConfigureChecks.cmake25
-rw-r--r--config.h.cmake8
-rw-r--r--doc/CMakeLists.txt34
-rw-r--r--po/CMakeLists.txt14
-rw-r--r--systemsettings/CMakeLists.txt57
-rw-r--r--systemsettings/menu/CMakeLists.txt51
7 files changed, 262 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f5309c0..b759ecc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,21 +1,78 @@
-project(playground-base)
+############################################
+# #
+# Improvements and feedbacks are welcome #
+# #
+# This file is released under GPL >= 3 #
+# #
+############################################
-find_package(KDE4 REQUIRED)
-include (KDE4Defaults)
-include(MacroOptionalAddSubdirectory)
-# search packages used by KDE
-#find_package (KDE4)
-#include(KDE4Defaults)
-#include(MacroLibrary)
+cmake_minimum_required( VERSION 2.8 )
-#add_subdirectory( qrdf )
-#add_subdirectory( raptor )
-# needs Qt 3.x
-#add_subdirectory( kbfx_plasma )
-#add_subdirectory( plasma )
-macro_optional_add_subdirectory( plasmagik )
-macro_optional_add_subdirectory( systemsettings )
+#### general package setup
-#add_subdirectory( strigiplasmoid )
+project( tde-systemsettings )
+set( VERSION R14.1.0 )
+
+
+#### include essential cmake modules
+
+include( FindPkgConfig )
+include( CheckFunctionExists )
+include( CheckSymbolExists )
+include( CheckIncludeFile )
+include( CheckLibraryExists )
+include( CheckCSourceCompiles )
+include( CheckCXXSourceCompiles )
+
+
+#### include our cmake modules
+
+set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
+include( TDEMacros )
+
+
+##### setup install paths
+
+include( TDESetupPaths )
+tde_setup_paths( )
+
+
+##### optional stuff
+
+option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
+option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
+
+
+##### user requested modules
+
+option( BUILD_ALL "Build all" ON )
+option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
+option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
+
+
+##### configure checks
+
+include( ConfigureChecks.cmake )
+
+
+###### global compiler settings
+
+add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST )
+
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
+set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
+set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
+
+
+##### directories
+
+add_subdirectory( systemsettings )
+tde_conditional_add_subdirectory( BUILD_DOC doc )
+tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
+
+
+##### write configure files
+
+configure_file( config.h.cmake config.h @ONLY )
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
new file mode 100644
index 0000000..d1e3778
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,25 @@
+###########################################
+# #
+# Improvements and feedback are welcome #
+# #
+# This file is released under GPL >= 3 #
+# #
+###########################################
+
+# required stuff
+find_package( TQt )
+find_package( TDE )
+
+tde_setup_architecture_flags( )
+
+include(TestBigEndian)
+test_big_endian(WORDS_BIGENDIAN)
+
+tde_setup_largefiles( )
+
+
+##### check for gcc visibility support
+
+if( WITH_GCC_VISIBILITY )
+ tde_setup_gcc_visibility( )
+endif( WITH_GCC_VISIBILITY )
diff --git a/config.h.cmake b/config.h.cmake
new file mode 100644
index 0000000..61ede3a
--- /dev/null
+++ b/config.h.cmake
@@ -0,0 +1,8 @@
+#define VERSION "@VERSION@"
+
+// Defined if you have fvisibility and fvisibility-inlines-hidden support.
+#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 0000000..f6eec15
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1,34 @@
+file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * )
+list( REMOVE_ITEM _dirs html man )
+
+string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
+
+foreach( _dir IN LISTS _dirs )
+ if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir}
+ AND ( "${_dir}" STREQUAL "en" OR
+ "${_linguas}" MATCHES "^;*$" OR
+ ";${_linguas};" MATCHES ";${_dir};" ))
+ file( GLOB _doc_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} ${_dir}/*.docbook )
+ if( _doc_files )
+ list( FIND _doc_files "index.docbook" _find_index )
+ if( -1 EQUAL _find_index )
+ set( _noindex "NOINDEX" )
+ else()
+ unset( _noindex )
+ endif()
+ tde_create_handbook(
+ SOURCE_BASEDIR ${_dir}
+ ${_noindex}
+ LANG ${_dir}
+ DESTINATION ${PROJECT_NAME}
+ )
+ endif()
+ endif()
+endforeach()
+
+if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/html/CMakeLists.txt )
+ add_subdirectory( html )
+endif()
+if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/man/CMakeLists.txt )
+ add_subdirectory( man )
+endif()
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100644
index 0000000..75c89f8
--- /dev/null
+++ b/po/CMakeLists.txt
@@ -0,0 +1,14 @@
+file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
+string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
+
+foreach( _po ${po_files} )
+ get_filename_component( _lang ${_po} NAME_WE )
+ if( "${_linguas}" MATCHES "^;*$" OR ";${_linguas};" MATCHES ";${_lang};" )
+ if( "${_po}" MATCHES "^([^/]*)/.*" )
+ string( REGEX REPLACE "^([^/]*)/.*" "\\1" _component "${_po}" )
+ else( )
+ set( _component "${PROJECT_NAME}" )
+ endif( )
+ tde_create_translation( FILES ${_po} LANG ${_lang} OUTPUT_NAME ${_component} )
+ endif( )
+endforeach( )
diff --git a/systemsettings/CMakeLists.txt b/systemsettings/CMakeLists.txt
new file mode 100644
index 0000000..c1a4bb2
--- /dev/null
+++ b/systemsettings/CMakeLists.txt
@@ -0,0 +1,57 @@
+add_subdirectory( menu )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### systemsettings (executable)
+
+tde_add_executable( systemsettings AUTOMOC
+
+ SOURCES
+ tdecmodulemenu.cpp
+ kcmsearch.cpp
+ kcmultiwidget.cpp
+ main.cpp
+ mainwindow.cpp
+ moduleiconitem.cpp
+ modulesview.cpp
+ kcscrollview.cpp
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdeio-shared
+ tdeutils-shared
+
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+
+##### icons
+
+tde_install_icons()
+
+
+##### other data
+
+tde_create_translated_desktop( systemsettings.desktop )
+
+install(
+ FILES systemsettingsui.rc
+ DESTINATION ${DATA_INSTALL_DIR}/systemsettings
+)
+
+install(
+ FILES systemsettingsrc
+ DESTINATION ${CONFIG_INSTALL_DIR}
+)
diff --git a/systemsettings/menu/CMakeLists.txt b/systemsettings/menu/CMakeLists.txt
new file mode 100644
index 0000000..b67407e
--- /dev/null
+++ b/systemsettings/menu/CMakeLists.txt
@@ -0,0 +1,51 @@
+##### other data
+
+tde_create_translated_desktop(
+ SOURCE
+ audioencoding.desktop
+ defaultapplication.desktop
+ kcmfontinst.desktop
+ kcm_knetworkconfmodule_ss.desktop
+ laptop.desktop
+ medianotifications.desktop
+)
+
+tde_create_translated_desktop(
+ SOURCE
+ tde-settings-accessibility_ss.directory
+ tde-settings-advanced.directory
+ tde-settings-advancedusersettings.directory
+ tde-settings-appearance.directory
+ tde-settings-computeradministration.directory
+ tde-settings-defaultapplications.directory
+ tde-settings-general.directory
+ tde-settings-keyboardmouse.directory
+ tde-settings-laptops.directory
+ tde-settings-looknfeel2.directory
+ tde-settings-networkconnections.directory
+ tde-settings-networkconnectivity.directory
+ tde-settings-networksettings.directory
+ tde-settings-notifications.directory
+ tde-settings-panel.directory
+ tde-settings-personal.directory
+ tde-settings-power.directory
+ tde-settings-regional.directory
+ tde-settings-sharing.directory
+ tde-settings-splashscreen.directory
+ tde-settings-system.directory
+ tde-settings-useraccount.directory
+ tde-settings-windowbehavior.directory
+ tde-system-settings.directory
+
+ DESTINATION ${XDG_DIRECTORY_INSTALL_DIR}
+)
+
+install(
+ FILES tde-system-settings-merge.menu
+ DESTINATION ${XDG_MENU_INSTALL_DIR}/applications-merged
+)
+
+install(
+ FILES tde-system-settings.menu
+ DESTINATION ${XDG_MENU_INSTALL_DIR}
+)