summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-03-05 19:43:11 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-03-08 10:42:37 +0900
commit41f6d5afec703320378e38c0bcefb064d42337e4 (patch)
treebb46f79e50b5e15efc32f3456052c9b2873531bf /CMakeLists.txt
parentb24092d4d2cdfef0145f580a6d66be9b0e06db4c (diff)
downloadgwenview-41f6d5afec703320378e38c0bcefb064d42337e4.tar.gz
gwenview-41f6d5afec703320378e38c0bcefb064d42337e4.zip
Conversion to cmake building system
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit bc9bda10c93ebfb9862270576b445d1c2798d66d)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt86
1 files changed, 86 insertions, 0 deletions
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 )