summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-03-30 17:34:00 +0300
committerMavridis Philippe <mavridisf@gmail.com>2021-03-30 18:57:45 +0300
commit079304a40aa3160172ccf5285bd0a2cede403513 (patch)
tree2645c519f75e9c2a4aae3aa4846034982a6eed38
parent2236746366ccdda326a30bce1deef1d4c5bddc73 (diff)
downloadkompose-079304a40aa3160172ccf5285bd0a2cede403513.tar.gz
kompose-079304a40aa3160172ccf5285bd0a2cede403513.zip
CMake build system support.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
-rw-r--r--.gitmodules3
-rw-r--r--CMakeL10n.txt23
-rw-r--r--CMakeLists.txt84
-rw-r--r--ConfigureChecks.cmake42
m---------cmake0
-rw-r--r--config.h.cmake12
-rw-r--r--doc/CMakeLists.txt34
-rw-r--r--src/CMakeL10n.txt3
-rw-r--r--src/CMakeLists.txt43
-rw-r--r--src/icons/CMakeLists.txt2
-rw-r--r--src/icons/hi16-action-kompose_current_virtual_desktop.png (renamed from src/hi16-action-kompose_current_virtual_desktop.png)bin886 -> 886 bytes
-rw-r--r--src/icons/hi16-action-kompose_grouped_by_virtual_desktop.png (renamed from src/hi16-action-kompose_grouped_by_virtual_desktop.png)bin809 -> 809 bytes
-rw-r--r--src/icons/hi16-action-kompose_ungrouped.png (renamed from src/hi16-action-kompose_ungrouped.png)bin681 -> 681 bytes
-rw-r--r--src/icons/hi16-app-kompose.png (renamed from src/hi16-app-kompose.png)bin684 -> 684 bytes
-rw-r--r--src/icons/hi32-action-kompose_current_virtual_desktop.png (renamed from src/hi32-action-kompose_current_virtual_desktop.png)bin1941 -> 1941 bytes
-rw-r--r--src/icons/hi32-action-kompose_grouped_by_virtual_desktop.png (renamed from src/hi32-action-kompose_grouped_by_virtual_desktop.png)bin1490 -> 1490 bytes
-rw-r--r--src/icons/hi32-action-kompose_ungrouped.png (renamed from src/hi32-action-kompose_ungrouped.png)bin1352 -> 1352 bytes
-rw-r--r--src/icons/hi32-app-kompose.png (renamed from src/hi32-app-kompose.png)bin1646 -> 1646 bytes
-rw-r--r--translations/CMakeLists.txt1
-rw-r--r--translations/Makefile.am (renamed from po/Makefile.am)0
-rw-r--r--translations/Makefile.in (renamed from po/Makefile.in)0
-rw-r--r--translations/messages/da.po (renamed from po/da.po)0
-rw-r--r--translations/messages/de.po (renamed from po/de.po)0
-rw-r--r--translations/messages/es.po (renamed from po/es.po)0
-rw-r--r--translations/messages/fr.po (renamed from po/fr.po)0
-rw-r--r--translations/messages/it.po (renamed from po/it.po)0
-rw-r--r--translations/messages/kompose.pot (renamed from po/kompose.pot)0
27 files changed, 247 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
index d71f439..c5143a3 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
[submodule "admin"]
path = admin
url = https://mirror.git.trinitydesktop.org/gitea/TDE/tde-common-admin
+[submodule "cmake"]
+ path = cmake
+ url = https://mirror.git.trinitydesktop.org/gitea/TDE/tde-common-cmake
diff --git a/CMakeL10n.txt b/CMakeL10n.txt
new file mode 100644
index 0000000..a525b71
--- /dev/null
+++ b/CMakeL10n.txt
@@ -0,0 +1,23 @@
+#################################################
+#
+# (C) 2018 Slávek Banko
+# slavek.banko (AT) axis.cz
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+cmake_minimum_required( VERSION 2.8 )
+
+
+##### include our cmake modules #################
+
+set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
+include( TDEL10n )
+
+
+##### create translation templates ##############
+
+tde_l10n_auto_add_subdirectories( )
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..4623736
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,84 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+# Modified by Mavridis Philippe for Komposé.
+#
+#################################################
+
+cmake_minimum_required( VERSION 2.8.12 )
+
+
+##### general package setup #####################
+
+project( kompose )
+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} )
+option( WITH_EMBEDDED_SQLITE "Use included SQLite instead of system one" ${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 )
+
+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" )
+
+
+##### source directories ########################
+
+add_subdirectory( src )
+tde_conditional_add_subdirectory( BUILD_DOC doc )
+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..0d81d2a
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,42 @@
+#################################################
+#
+# (C) 2010 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+# Modified by Mavridis Philippe for Komposé.
+#
+#################################################
+
+
+# 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 )
+
+find_package( X11 )
+
+
+##### check for imlib2
+
+pkg_search_module( IMLIB2 imlib2 )
+
+if( NOT IMLIB2_FOUND )
+ tde_message_fatal( "imlib2 is required but not found on your system" )
+endif( NOT IMLIB2_FOUND )
diff --git a/cmake b/cmake
new file mode 160000
+Subproject f0a5bcc7600c36f8fe59754d1167d1bbc70a495
diff --git a/config.h.cmake b/config.h.cmake
new file mode 100644
index 0000000..67860c5
--- /dev/null
+++ b/config.h.cmake
@@ -0,0 +1,12 @@
+#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@
+
+/* Defined if you don't have either the XTest headers or
+ the xcb-util-keysyms headers */
+#cmakedefine NO_XTEST_EXTENSION 1
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/src/CMakeL10n.txt b/src/CMakeL10n.txt
new file mode 100644
index 0000000..7d91398
--- /dev/null
+++ b/src/CMakeL10n.txt
@@ -0,0 +1,3 @@
+##### create translation templates ##############
+
+tde_l10n_create_template( "messages/kompose" )
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..6bb3f3e
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,43 @@
+add_subdirectory( icons )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${IMLIB2_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+##### kompose (executable)
+tde_add_executable( ${PROJECT_NAME} AUTOMOC
+
+ SOURCES
+ main.cpp kompose.cpp komposetaskmanager.cpp komposetask.cpp
+ komposewidget.cpp komposetaskwidget.cpp komposedesktopwidget.cpp komposelayout.cpp
+ komposesystray.cpp komposefullscreenwidget.cpp komposesettings.cpp komposepreferences.cpp
+ komposetaskprefswidget.cpp komposeglobal.cpp komposetaskcontainerwidget.cpp
+ komposetaskvisualizer.cpp komposeviewmanager.cpp komposedcopiface.skel
+
+ LINK
+ tdecore-shared
+ tdeui-shared
+ ${IMLIB2_LIBRARIES}
+
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+##### create translated desktop files
+
+tde_create_translated_desktop( kompose.desktop )
+
+##### install XML-GUI resource file
+install(
+ FILES komposeui.rc
+ DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}
+)
diff --git a/src/icons/CMakeLists.txt b/src/icons/CMakeLists.txt
new file mode 100644
index 0000000..fd330f5
--- /dev/null
+++ b/src/icons/CMakeLists.txt
@@ -0,0 +1,2 @@
+tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/icons )
+tde_install_icons( app-kompose )
diff --git a/src/hi16-action-kompose_current_virtual_desktop.png b/src/icons/hi16-action-kompose_current_virtual_desktop.png
index de19389..de19389 100644
--- a/src/hi16-action-kompose_current_virtual_desktop.png
+++ b/src/icons/hi16-action-kompose_current_virtual_desktop.png
Binary files differ
diff --git a/src/hi16-action-kompose_grouped_by_virtual_desktop.png b/src/icons/hi16-action-kompose_grouped_by_virtual_desktop.png
index 26dc380..26dc380 100644
--- a/src/hi16-action-kompose_grouped_by_virtual_desktop.png
+++ b/src/icons/hi16-action-kompose_grouped_by_virtual_desktop.png
Binary files differ
diff --git a/src/hi16-action-kompose_ungrouped.png b/src/icons/hi16-action-kompose_ungrouped.png
index 7bd14a3..7bd14a3 100644
--- a/src/hi16-action-kompose_ungrouped.png
+++ b/src/icons/hi16-action-kompose_ungrouped.png
Binary files differ
diff --git a/src/hi16-app-kompose.png b/src/icons/hi16-app-kompose.png
index 691be39..691be39 100644
--- a/src/hi16-app-kompose.png
+++ b/src/icons/hi16-app-kompose.png
Binary files differ
diff --git a/src/hi32-action-kompose_current_virtual_desktop.png b/src/icons/hi32-action-kompose_current_virtual_desktop.png
index 0854ab6..0854ab6 100644
--- a/src/hi32-action-kompose_current_virtual_desktop.png
+++ b/src/icons/hi32-action-kompose_current_virtual_desktop.png
Binary files differ
diff --git a/src/hi32-action-kompose_grouped_by_virtual_desktop.png b/src/icons/hi32-action-kompose_grouped_by_virtual_desktop.png
index c3d92a0..c3d92a0 100644
--- a/src/hi32-action-kompose_grouped_by_virtual_desktop.png
+++ b/src/icons/hi32-action-kompose_grouped_by_virtual_desktop.png
Binary files differ
diff --git a/src/hi32-action-kompose_ungrouped.png b/src/icons/hi32-action-kompose_ungrouped.png
index 5497100..5497100 100644
--- a/src/hi32-action-kompose_ungrouped.png
+++ b/src/icons/hi32-action-kompose_ungrouped.png
Binary files differ
diff --git a/src/hi32-app-kompose.png b/src/icons/hi32-app-kompose.png
index 45ec52a..45ec52a 100644
--- a/src/hi32-app-kompose.png
+++ b/src/icons/hi32-app-kompose.png
Binary files differ
diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt
new file mode 100644
index 0000000..94897a3
--- /dev/null
+++ b/translations/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories() \ No newline at end of file
diff --git a/po/Makefile.am b/translations/Makefile.am
index 0fa209c..0fa209c 100644
--- a/po/Makefile.am
+++ b/translations/Makefile.am
diff --git a/po/Makefile.in b/translations/Makefile.in
index 23f5e64..23f5e64 100644
--- a/po/Makefile.in
+++ b/translations/Makefile.in
diff --git a/po/da.po b/translations/messages/da.po
index fb84da4..fb84da4 100644
--- a/po/da.po
+++ b/translations/messages/da.po
diff --git a/po/de.po b/translations/messages/de.po
index afd0d83..afd0d83 100644
--- a/po/de.po
+++ b/translations/messages/de.po
diff --git a/po/es.po b/translations/messages/es.po
index 7f989d4..7f989d4 100644
--- a/po/es.po
+++ b/translations/messages/es.po
diff --git a/po/fr.po b/translations/messages/fr.po
index 10c2cda..10c2cda 100644
--- a/po/fr.po
+++ b/translations/messages/fr.po
diff --git a/po/it.po b/translations/messages/it.po
index 58f37f6..58f37f6 100644
--- a/po/it.po
+++ b/translations/messages/it.po
diff --git a/po/kompose.pot b/translations/messages/kompose.pot
index f2435b7..f2435b7 100644
--- a/po/kompose.pot
+++ b/translations/messages/kompose.pot