summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-03-22 20:52:44 +0900
committerMavridis Philippe <mavridisf@gmail.com>2024-03-24 23:17:01 +0200
commitfd62635a2792b5cbbbae1c5288992af0054332ee (patch)
tree142ee8d27f069a78e367f1eaa837d6e4c2c600ea /CMakeLists.txt
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 <michele.calgaro@yahoo.it>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt119
1 files changed, 71 insertions, 48 deletions
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 )