summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2020-07-04 18:35:40 +0200
committergregory guy <gregory-tde@laposte.net>2020-07-05 16:50:07 +0200
commit544a219d602129cf446659b2f56aeabee69d0182 (patch)
tree5a2a565a88b89afbdd67dd8ba74dc72446b9d968
parent23c0ecabcb79e123a01b1f0d7e6fc7f02e0daf4e (diff)
downloadtde-style-domino-544a219d602129cf446659b2f56aeabee69d0182.tar.gz
tde-style-domino-544a219d602129cf446659b2f56aeabee69d0182.zip
Conversion to the cmake building system.
Signed-off-by: gregory guy <gregory-tde@laposte.net>
-rw-r--r--CMakeLists.txt79
-rw-r--r--ConfigureChecks.cmake56
-rw-r--r--client/CMakeLists.txt42
-rw-r--r--client/config/CMakeLists.txt26
-rw-r--r--client/config/Makefile.am2
-rw-r--r--client/config/config.cpp4
-rw-r--r--client/config/dominoConfig.h (renamed from client/config/config.h)4
-rw-r--r--config.h.cmake8
-rw-r--r--domino/CMakeLists.txt64
-rw-r--r--dominoConfig/CMakeLists.txt27
10 files changed, 309 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..e1bfe08
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,79 @@
+############################################
+# #
+# Improvements and feedbacks are welcome #
+# #
+# This file is released under GPL >= 3 #
+# #
+############################################
+
+
+cmake_minimum_required( VERSION 2.8 )
+
+
+#### general package setup
+
+project( tde-style-domino )
+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_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( client )
+add_subdirectory( domino )
+add_subdirectory( dominoConfig )
+
+#tde_conditional_add_subdirectory( BUILD_TRANSLATIONS translations )
+
+
+##### 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..c89e244
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,56 @@
+###########################################
+# #
+# 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 )
+
+##### check for X11
+
+find_package( X11 )
+
+
+##### check for xft
+
+pkg_search_module( XFT xft )
+
+if( NOT XFT_FOUND )
+ tde_message_fatal("Xft is required but was not found on your system" )
+endif( NOT XFT_FOUND )
+
+
+##### check for xcb-shape
+
+pkg_search_module( XCB_SHAPE xcb-shape )
+
+if( NOT XCB_SHAPE_FOUND )
+ tde_message_fatal("xcb-shape is required but was not found on your system" )
+endif( NOT XCB_SHAPE_FOUND )
+
+
+##### check for freetype2
+
+pkg_search_module( FREETYPE freetype2 )
+
+if( NOT FREETYPE_FOUND )
+ tde_message_fatal("freetype2 is required, but was not found on your system" )
+endif( NOT FREETYPE_FOUND )
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
new file mode 100644
index 0000000..138918b
--- /dev/null
+++ b/client/CMakeLists.txt
@@ -0,0 +1,42 @@
+tde_import( twin )
+
+add_subdirectory( config )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${XCB_SHAPE_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIBRARY_DIRS}
+ ${XCB_SHAPE_LIBRARY_DIRS}
+)
+
+
+##### twin3_domino (kpart)
+
+tde_add_kpart( twin3_domino AUTOMOC
+
+ SOURCES
+ dominoclient.cpp
+ LINK
+ tdecore-shared
+ tdecorations-shared
+ ${X11_LIBRARIES}
+ ${XCB_SHAPE_LIBRARIES}
+
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### other data
+
+install(
+ FILES domino.desktop
+ DESTINATION ${DATA_INSTALL_DIR}/twin
+)
diff --git a/client/config/CMakeLists.txt b/client/config/CMakeLists.txt
new file mode 100644
index 0000000..e2193f8
--- /dev/null
+++ b/client/config/CMakeLists.txt
@@ -0,0 +1,26 @@
+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_LIBRARY_DIRS}
+)
+
+
+##### twin_domino_config (kpart)
+
+tde_add_kpart( twin_domino_config AUTOMOC
+
+ SOURCES
+ config.cpp
+ LINK
+ tdecore-shared
+ tdeui-shared
+
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/client/config/Makefile.am b/client/config/Makefile.am
index 8831c43..0e0c631 100644
--- a/client/config/Makefile.am
+++ b/client/config/Makefile.am
@@ -7,4 +7,4 @@ twin_domino_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
twin_domino_config_la_LIBADD = $(LIB_TDEUI) $(LIB_TQT) $(LIB_TDECORE)
METASOURCES = AUTO
-noinst_HEADERS = config.h
+noinst_HEADERS = dominoConfig.h
diff --git a/client/config/config.cpp b/client/config/config.cpp
index 5dfffb2..48025ae 100644
--- a/client/config/config.cpp
+++ b/client/config/config.cpp
@@ -20,7 +20,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
+#include "dominoConfig.h"
#include <tdeglobal.h>
#include <tdelocale.h>
#include <tqvbox.h>
@@ -284,5 +284,5 @@ void DominoConfig::loadButtonContourColors() {
}
-#include "config.moc"
+#include "dominoConfig.moc"
diff --git a/client/config/config.h b/client/config/dominoConfig.h
index e48e96e..6313d96 100644
--- a/client/config/config.h
+++ b/client/config/dominoConfig.h
@@ -23,6 +23,10 @@
#ifndef DOMINOCONFIG_H
#define DOMINOCONFIG_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <tqcheckbox.h>
#include <tdeconfig.h>
#include <tqvbox.h>
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/domino/CMakeLists.txt b/domino/CMakeLists.txt
new file mode 100644
index 0000000..01fb7f6
--- /dev/null
+++ b/domino/CMakeLists.txt
@@ -0,0 +1,64 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${X11_INCLUDE_DIR}
+ ${XFT_INCLUDE_DIRS}
+ ${XCB_SHAPE_INCLUDE_DIRS}
+ ${FREETYPE_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIBRARY_DIRS}
+ ${X11_LIBRARY_DIRS}
+ ${XFT_LIBRARY_DIRS}
+ ${XCB_SHAPE_LIBRARY_DIRS}
+ ${FREETYPE_LIBRARY_DIRS}
+)
+
+
+set( _srcs domino.cpp misc.cpp )
+set( _libs tdecore-shared tdeui-shared tdeutils-shared
+ ${X11_LIBRARIES} ${XFT_LIBRARIES}
+ ${XCB_SHAPE_LIBRARIES} ${FREETYPE_LIBRARIES}
+)
+
+
+##### domino (kpart)
+
+tde_add_kpart( domino AUTOMOC
+
+ SOURCES
+ ${_srcs}
+ LINK
+ ${_libs}
+
+ DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/styles
+)
+
+
+##### domino_style (STATIC)
+
+tde_add_library( domino_style STATIC_PIC AUTOMOC
+
+ SOURCES
+ ${_srcs}
+ LINK
+ ${_libs}
+)
+
+
+##### other data
+
+install(
+ FILES domino.themerc
+ DESTINATION ${DATA_INSTALL_DIR}/tdestyle/themes
+)
+
+install(
+ FILES Domino.kcsrc
+ DESTINATION ${DATA_INSTALL_DIR}/tdedisplay/color-schemes
+)
diff --git a/dominoConfig/CMakeLists.txt b/dominoConfig/CMakeLists.txt
new file mode 100644
index 0000000..38ce752
--- /dev/null
+++ b/dominoConfig/CMakeLists.txt
@@ -0,0 +1,27 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${FREETYPE_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIBRARY_DIRS}
+)
+
+
+##### tdestyle_domino_config (kpart)
+
+tde_add_kpart( tdestyle_domino_config AUTOMOC
+
+ SOURCES
+ dominoconf.cpp
+ LINK
+ tdeio-shared
+ domino_style-static
+
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)