Conversion to the cmake building system.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
pull/1/head
gregory guy 4 years ago
parent 23c0ecabcb
commit 544a219d60
No known key found for this signature in database
GPG Key ID: 3BCCA0F7AB4536F4

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

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

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

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

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

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

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

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

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

@ -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}
)
Loading…
Cancel
Save