From 41f6d5afec703320378e38c0bcefb064d42337e4 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 5 Mar 2024 19:43:11 +0900 Subject: Conversion to cmake building system Signed-off-by: Michele Calgaro (cherry picked from commit bc9bda10c93ebfb9862270576b445d1c2798d66d) --- CMakeLists.txt | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e216c60 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,86 @@ +############################################ +# # +# Improvements and feedbacks are welcome # +# # +# This file is released under GPL >= 3 # +# # +############################################ + + +cmake_minimum_required( VERSION 3.5 ) + + +#### general package setup + +project( gwenview ) + + +#### include essential cmake modules + +include( FindPkgConfig ) +include( CheckSymbolExists ) +include( CheckIncludeFile ) +include( CheckLibraryExists ) +include( CheckCSourceCompiles ) +include( CheckCXXSourceCompiles ) +enable_testing() + + +#### include our cmake modules + +include( TDEMacros ) + + +##### set version number ######################## + +tde_set_project_version( ) + + +##### setup install paths + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### optional stuff + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_KIPI "Enable kipi support" ${WITH_ALL_OPTIONS} ) +option( WITH_MNG "Enable mng support" ${WITH_ALL_OPTIONS} ) +option( WITH_XCURSOR "Enable xcursor support" ${WITH_ALL_OPTIONS} ) + +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) + + +##### user requested modules + +option( BUILD_ALL "Build all" ON ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) + + +##### configure checks + +include( ConfigureChecks.cmake ) + + +###### global compiler settings + +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( icons ) +add_subdirectory( src ) + + +##### other data ################################ + +tde_conditional_add_project_docs( BUILD_DOC ) + + +##### write configure files + +configure_file( config.h.cmake config.h @ONLY ) -- cgit v1.2.1