Warning, /utilities/basket/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: (C) 2008 Kelvie Wong <kelvie@ieee.org>
0002 # SPDX-FileCopyrightText: (C) 2014 Gleb Baryshev <gleb.baryshev@gmail.com>
0003 # SPDX-FileCopyrightText: (C) 2018 Luigi Toscano <luigi.toscano@tiscali.it>
0004 #
0005 # SPDX-License-Identifier: GPL-2.0-or-later
0006 cmake_minimum_required(VERSION 3.5)
0007 
0008 project(Basket VERSION 2.49.90)
0009 
0010 set(REQUIRED_KF5_VERSION "5.60.0")
0011 set(REQUIRED_QT5_VERSION "5.12.0")
0012 
0013 # Options
0014 option(ENABLE_GPG "Enabled GPG Support" OFF)
0015 
0016 # ECM
0017 include(FeatureSummary)
0018 find_package(ECM REQUIRED NO_MODULE)
0019 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules")
0020 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
0021 
0022 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/Modules)
0023 
0024 include(ECMSetupVersion)
0025 include(KDEInstallDirs)
0026 include(KDECMakeSettings)
0027 include(KDEClangFormat)
0028 include(KDECompilerSettings NO_POLICY_SCOPE)
0029 include(KDEInstallDirs)
0030 include(ECMInstallIcons)
0031 
0032 ecm_setup_version(
0033     PROJECT
0034     VARIABLE_PREFIX BASKET
0035     VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/basket_version.h")
0036 
0037 # GPG
0038 if (ENABLE_GPG)
0039     find_package(Gpgme)
0040 endif()
0041 
0042 # libgit2
0043 find_package(Libgit2)
0044 set_package_properties(Libgit2 PROPERTIES DESCRIPTION "A library to manipulate git repositories"
0045     PURPOSE "Add git support to Basket"
0046     URL "https://libgit2.org"
0047     TYPE OPTIONAL
0048 )
0049 if (LIBGIT2_FOUND)
0050     include_directories(${LIBGIT2_INCLUDE_DIR})
0051     add_definitions(-DWITH_LIBGIT2)
0052 endif()
0053 
0054 # TODO make X11 optional
0055 find_package(X11 REQUIRED)
0056 
0057 find_package(Qt5 ${REQUIRED_QT5_VERSION} REQUIRED COMPONENTS
0058     Concurrent
0059     Core
0060     DBus
0061     Gui
0062     Widgets
0063     Xml
0064 )
0065 
0066 find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED COMPONENTS
0067     Archive
0068     Completion
0069     Config
0070     ConfigWidgets #KCM
0071     CoreAddons
0072     Crash
0073     DBusAddons
0074     DocTools
0075     FileMetaData
0076     GlobalAccel
0077     GuiAddons
0078     I18n
0079     IconThemes
0080     KCMUtils
0081     KIO
0082     Notifications
0083     Parts
0084     Service
0085     TextWidgets
0086     WidgetsAddons
0087     WindowSystem
0088     XmlGui
0089 )
0090 
0091 find_package(Phonon4Qt5 REQUIRED)
0092 
0093 if (GPGME_FOUND)
0094     set(HAVE_LIBGPGME 1)
0095     SET(LARGEFILE_SOURCE_1)
0096     ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64)
0097 else()
0098     if (BASKET_DISABLE_GPG)
0099         MESSAGE("GPG disabled, configuring without")
0100     else()
0101         MESSAGE("GPG not found, configuring without")
0102     endif()
0103 endif()
0104 
0105 
0106 #TODO: find meinproc
0107 
0108 #Make libbasketcommon search for translations in basket.mo
0109 add_definitions(-DTRANSLATION_DOMAIN=\"basket\")
0110 add_definitions(-DQT_NO_KEYWORDS)
0111 
0112 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
0113 include_directories(${CMAKE_CURRENT_BINARY_DIR})
0114 
0115 add_subdirectory(doc)
0116 add_subdirectory(src)
0117 add_subdirectory(tags)
0118 add_subdirectory(welcome)
0119 add_subdirectory(backgrounds)
0120 add_subdirectory(images)
0121 add_subdirectory(file-integration)
0122 
0123 if(BUILD_DEVTOOLS)
0124     add_subdirectory(devtools)
0125 endif()
0126 
0127 ki18n_install(po)
0128 
0129 # add clang-format target for all our real source files
0130 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0131 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})