summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-03-22 20:52:44 +0900
committerMavridis Philippe <[email protected]>2024-03-24 23:17:01 +0200
commitfd62635a2792b5cbbbae1c5288992af0054332ee (patch)
tree142ee8d27f069a78e367f1eaa837d6e4c2c600ea
parent57f8e4dbf7dc6cce58dfc11b5aab03e86b7cbdc7 (diff)
downloadtde-style-polyester-fd62635a2792b5cbbbae1c5288992af0054332ee.tar.gz
tde-style-polyester-fd62635a2792b5cbbbae1c5288992af0054332ee.zip
Use centralized cmake version. Align cmake files to usual TDE style
Signed-off-by: Michele Calgaro <[email protected]>
-rw-r--r--CMakeL10n.txt20
-rw-r--r--CMakeLists.txt119
-rw-r--r--ConfigureChecks.cmake21
-rw-r--r--client/CMakeLists.txt6
-rw-r--r--client/config/CMakeLists.txt13
-rw-r--r--color-schemes/CMakeLists.txt4
-rw-r--r--config.h.cmake1
-rw-r--r--style/CMakeLists.txt11
-rw-r--r--style/config/CMakeLists.txt14
9 files changed, 119 insertions, 90 deletions
diff --git a/CMakeL10n.txt b/CMakeL10n.txt
index 3fdae80..0b6987e 100644
--- a/CMakeL10n.txt
+++ b/CMakeL10n.txt
@@ -8,13 +8,25 @@
# Improvements and feedback are welcome! #
################################################################################
-cmake_minimum_required(VERSION 3.5)
-include(TDEL10n)
-tde_l10n_auto_add_subdirectories()
+##### set project version ########################
+
+include( TDEVersion )
+cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} )
+
+
+##### include our cmake modules #################
+
+include( TDEL10n )
+
+
+##### create translation templates ##############
+
+tde_l10n_auto_add_subdirectories( )
### create translation templates ###############################################
+
tde_l10n_create_template( "messages/polyester/" )
tde_l10n_create_template(
@@ -25,4 +37,4 @@ tde_l10n_create_template(
color-schemes/PolyesterBlue.kcsrc
color-schemes/PolyesterEmerald.kcsrc
color-schemes/PolyesterOrangeJuice.kcsrc
-) \ No newline at end of file
+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72877b4..6ba0142 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,51 +6,74 @@
# Improvements and feedback are welcome! #
################################################################################
-cmake_minimum_required(VERSION 3.5)
-
-### general package setup ######################################################
-project(tde-style-polyester)
-
-### essential cmake modules ####################################################
-include(FindPkgConfig)
-include(CheckFunctionExists)
-include(CheckSymbolExists)
-include(CheckIncludeFile)
-include(CheckLibraryExists)
-include(CheckCSourceCompiles)
-include(CheckCXXSourceCompiles)
-
-### TDE modules ################################################################
-include(TDEMacros)
-tde_set_project_version()
-
-include(TDESetupPaths)
-tde_setup_paths()
-
-### optional support ###########################################################
-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_TWIN_DECORATION "Build window decoration for twin" ${BUILD_ALL})
-option(BUILD_WIDGET_STYLE "Build widget style" ${BUILD_ALL})
-option(BUILD_COLOR_SCHEMES "Install color schemes" ${BUILD_ALL})
-
-### configure checks ###########################################################
-include(ConfigureChecks.cmake)
-
-### 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")
-
-### subdirectories #############################################################
-tde_conditional_add_subdirectory(BUILD_TWIN_DECORATION client)
-tde_conditional_add_subdirectory(BUILD_WIDGET_STYLE style)
-tde_conditional_add_subdirectory(BUILD_COLOR_SCHEMES color-schemes)
-
-### write configuration ########################################################
-configure_file(config.h.cmake config.h @ONLY) \ No newline at end of file
+
+##### set project version ########################
+
+include( TDEVersion )
+cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} )
+tde_set_project_version( )
+
+
+##### general package setup
+
+project( tde-style-polyester )
+
+
+##### include essential cmake modules
+
+include( FindPkgConfig )
+include( CheckFunctionExists )
+include( CheckSymbolExists )
+include( CheckIncludeFile )
+include( CheckLibraryExists )
+include( CheckCSourceCompiles )
+include( CheckCXXSourceCompiles )
+
+
+##### include our 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_TWIN_DECORATION "Build window decoration for twin" ${BUILD_ALL} )
+option( BUILD_WIDGET_STYLE "Build widget style" ${BUILD_ALL} )
+option( BUILD_COLOR_SCHEMES "Install color schemes" ${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" )
+
+
+##### directories
+
+tde_conditional_add_subdirectory( BUILD_TWIN_DECORATION client )
+tde_conditional_add_subdirectory( BUILD_WIDGET_STYLE style )
+tde_conditional_add_subdirectory( BUILD_COLOR_SCHEMES color-schemes )
+
+##### write configure files
+
+configure_file( config.h.cmake config.h @ONLY )
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index bde6757..3117295 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -6,18 +6,21 @@
# Improvements and feedback are welcome! #
################################################################################
-### TQt/TDE ####################################################################
-find_package(TQt)
-find_package(TDE)
-tde_setup_architecture_flags()
+# required stuff
+find_package( TQt )
+find_package( TDE )
+
+tde_setup_architecture_flags( )
include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
-tde_setup_largefiles()
+tde_setup_largefiles( )
+
+
+##### check for gcc visibility support
-### GCC visibility #############################################################
-if (WITH_GCC_VISIBILITY)
- tde_setup_gcc_visibility()
-endif() \ No newline at end of file
+if( WITH_GCC_VISIBILITY )
+ tde_setup_gcc_visibility( )
+endif( WITH_GCC_VISIBILITY )
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index ecb2c0d..07fb701 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -22,8 +22,8 @@ link_directories(
tde_import(twin)
### twin_polyester (kpart) #####################################################
-tde_add_kpart(twin_polyester
- AUTOMOC
+
+tde_add_kpart( twin_polyester AUTOMOC
SOURCES
polyester.cpp
@@ -39,10 +39,12 @@ tde_add_kpart(twin_polyester
)
### other data #################################################################
+
install(
FILES polyester.desktop
DESTINATION ${DATA_INSTALL_DIR}/twin
)
### configuration module #######################################################
+
add_subdirectory(config)
diff --git a/client/config/CMakeLists.txt b/client/config/CMakeLists.txt
index 7868bae..ba7496c 100644
--- a/client/config/CMakeLists.txt
+++ b/client/config/CMakeLists.txt
@@ -7,26 +7,19 @@
################################################################################
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}
)
### buttons.h ##################################################################
+
add_custom_target(buttons.h
COMMAND ${CMAKE_COMMAND} -E create-buttons.sh
)
### twin_polyester_config (kpart) ##############################################
-tde_add_kpart(twin_polyester_config
- AUTOMOC
+
+tde_add_kpart( twin_polyester_config AUTOMOC
SOURCES
configdialog.ui
diff --git a/color-schemes/CMakeLists.txt b/color-schemes/CMakeLists.txt
index 6d53e8f..30d29ea 100644
--- a/color-schemes/CMakeLists.txt
+++ b/color-schemes/CMakeLists.txt
@@ -6,9 +6,9 @@
# Improvements and feedback are welcome! #
################################################################################
-foreach (COLOR_SCHEME PolyesterBlue PolyesterEmerald PolyesterOrangeJuice)
+foreach( COLOR_SCHEME PolyesterBlue PolyesterEmerald PolyesterOrangeJuice)
tde_create_translated_desktop(
SOURCE ${COLOR_SCHEME}.kcsrc
DESTINATION ${DATA_INSTALL_DIR}/tdedisplay/color-schemes
)
-endforeach() \ No newline at end of file
+endforeach()
diff --git a/config.h.cmake b/config.h.cmake
index 120d520..61ede3a 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -6,4 +6,3 @@
/* 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/style/CMakeLists.txt b/style/CMakeLists.txt
index 8087699..e1a076b 100644
--- a/style/CMakeLists.txt
+++ b/style/CMakeLists.txt
@@ -19,9 +19,10 @@ link_directories(
${TDE_LIBRARY_DIRS}
)
+
### polyester (kpart) ##########################################################
-tde_add_kpart(polyester
- AUTOMOC
+
+tde_add_kpart( polyester AUTOMOC
SOURCES
polyester.cpp
@@ -33,11 +34,15 @@ tde_add_kpart(polyester
DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/styles
)
+
### configuration module #######################################################
+
add_subdirectory(config)
+
### other data #################################################################
+
install(
FILES polyester.themerc
DESTINATION ${DATA_INSTALL_DIR}/tdestyle/themes
-) \ No newline at end of file
+)
diff --git a/style/config/CMakeLists.txt b/style/config/CMakeLists.txt
index b5d8768..bace828 100644
--- a/style/config/CMakeLists.txt
+++ b/style/config/CMakeLists.txt
@@ -7,21 +7,13 @@
################################################################################
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}
)
### tdestyle_polyester_config (kpart) ##########################################
-tde_add_kpart(tdestyle_polyester_config
- AUTOMOC
+
+tde_add_kpart( tdestyle_polyester_config AUTOMOC
SOURCES
configdialog.ui
@@ -32,4 +24,4 @@ tde_add_kpart(tdestyle_polyester_config
tdeui-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
-) \ No newline at end of file
+)