Browse Source

CMake build system support.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/1/head
Mavridis Philippe 1 year ago
parent
commit
079304a40a
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494
  1. 3
      .gitmodules
  2. 23
      CMakeL10n.txt
  3. 84
      CMakeLists.txt
  4. 42
      ConfigureChecks.cmake
  5. 1
      cmake
  6. 12
      config.h.cmake
  7. 34
      doc/CMakeLists.txt
  8. 3
      src/CMakeL10n.txt
  9. 43
      src/CMakeLists.txt
  10. 2
      src/icons/CMakeLists.txt
  11. 0
      src/icons/hi16-action-kompose_current_virtual_desktop.png
  12. 0
      src/icons/hi16-action-kompose_grouped_by_virtual_desktop.png
  13. 0
      src/icons/hi16-action-kompose_ungrouped.png
  14. 0
      src/icons/hi16-app-kompose.png
  15. 0
      src/icons/hi32-action-kompose_current_virtual_desktop.png
  16. 0
      src/icons/hi32-action-kompose_grouped_by_virtual_desktop.png
  17. 0
      src/icons/hi32-action-kompose_ungrouped.png
  18. 0
      src/icons/hi32-app-kompose.png
  19. 1
      translations/CMakeLists.txt
  20. 0
      translations/Makefile.am
  21. 0
      translations/Makefile.in
  22. 0
      translations/messages/da.po
  23. 0
      translations/messages/de.po
  24. 0
      translations/messages/es.po
  25. 0
      translations/messages/fr.po
  26. 0
      translations/messages/it.po
  27. 0
      translations/messages/kompose.pot

3
.gitmodules vendored

@ -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

23
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( )

84
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 )

42
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 )

1
cmake

@ -0,0 +1 @@
Subproject commit f0a5bcc7600c36f8fe59754d1167d1bbc70a4953

12
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

34
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()

3
src/CMakeL10n.txt

@ -0,0 +1,3 @@
##### create translation templates ##############
tde_l10n_create_template( "messages/kompose" )

43
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}
)

2
src/icons/CMakeLists.txt

@ -0,0 +1,2 @@
tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/icons )
tde_install_icons( app-kompose )

0
src/hi16-action-kompose_current_virtual_desktop.png → src/icons/hi16-action-kompose_current_virtual_desktop.png

Before

Width:  |  Height:  |  Size: 886 B

After

Width:  |  Height:  |  Size: 886 B

0
src/hi16-action-kompose_grouped_by_virtual_desktop.png → src/icons/hi16-action-kompose_grouped_by_virtual_desktop.png

Before

Width:  |  Height:  |  Size: 809 B

After

Width:  |  Height:  |  Size: 809 B

0
src/hi16-action-kompose_ungrouped.png → src/icons/hi16-action-kompose_ungrouped.png

Before

Width:  |  Height:  |  Size: 681 B

After

Width:  |  Height:  |  Size: 681 B

0
src/hi16-app-kompose.png → src/icons/hi16-app-kompose.png

Before

Width:  |  Height:  |  Size: 684 B

After

Width:  |  Height:  |  Size: 684 B

0
src/hi32-action-kompose_current_virtual_desktop.png → src/icons/hi32-action-kompose_current_virtual_desktop.png

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

0
src/hi32-action-kompose_grouped_by_virtual_desktop.png → src/icons/hi32-action-kompose_grouped_by_virtual_desktop.png

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

0
src/hi32-action-kompose_ungrouped.png → src/icons/hi32-action-kompose_ungrouped.png

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

0
src/hi32-app-kompose.png → src/icons/hi32-app-kompose.png

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

1
translations/CMakeLists.txt

@ -0,0 +1 @@
tde_auto_add_subdirectories()

0
po/Makefile.am → translations/Makefile.am

0
po/Makefile.in → translations/Makefile.in

0
po/da.po → translations/messages/da.po

0
po/de.po → translations/messages/de.po

0
po/es.po → translations/messages/es.po

0
po/fr.po → translations/messages/fr.po

0
po/it.po → translations/messages/it.po

0
po/kompose.pot → translations/messages/kompose.pot

Loading…
Cancel
Save