Warning, /system/apper/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.0)
0002 cmake_policy(SET CMP0063 NEW)
0003 
0004 project(Apper VERSION 1.0.0)
0005 
0006 find_package(ECM REQUIRED NO_MODULE)
0007 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0008 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/)
0009 
0010 set(CMAKE_AUTOMOC ON)
0011 set(CMAKE_INCLUDE_CURRENT_DIR ON)
0012 
0013 include(KDEInstallDirs)
0014 include(KDECMakeSettings)
0015 include(KDECompilerSettings NO_POLICY_SCOPE)
0016 
0017 include(FindPkgConfig)
0018 include(FeatureSummary)
0019 include(ECMInstallIcons)
0020 
0021 find_package(Qt5 5.7.0 CONFIG REQUIRED Core DBus Widgets Quick Sql XmlPatterns)
0022 
0023 # Load the frameworks we need
0024 find_package(KF5 REQUIRED COMPONENTS
0025   Config
0026   DocTools
0027   GuiAddons
0028   I18n
0029   KCMUtils
0030   DBusAddons
0031   KIO
0032   Notifications
0033   IconThemes
0034 )
0035 find_package(LibKWorkspace REQUIRED)
0036 find_package(KDED REQUIRED)
0037 find_package(PackageKitQt5 1.0.0 REQUIRED)
0038 
0039 #
0040 # Options
0041 #
0042 
0043 # The various parts of Apper that can be built, or not.
0044 option(BUILD_APPER "Build the Apper application" ON)
0045 option(BUILD_APPERD "Build the Apper daemon" ON)
0046 option(BUILD_DECLARATIVE "Build the Qt Quick plugins" ON)
0047 option(BUILD_PKSESSION "Build the PkSession helper application" ON)
0048 option(BUILD_PLASMOID "Build the update notifier plasmoid" ON)
0049 
0050 # Only for Debian based systems
0051 option(DEBCONF_SUPPORT "Build Apper with debconf support" OFF)
0052 
0053 # Yum does not support this
0054 option(AUTOREMOVE "Build Apper with auto remove enabled" OFF)
0055 set(HAVE_AUTOREMOVE ${AUTOREMOVE})
0056 message(STATUS "Building Apper with auto remove: " ${AUTOREMOVE})
0057 
0058 # AppStream application management support
0059 option(APPSTREAM "Build Apper with AppStream support" OFF)
0060 set(HAVE_APPSTREAM ${APPSTREAM})
0061 message(STATUS "Building Apper with AppStream support: " ${APPSTREAM})
0062 
0063 # Enable support for Limba packages
0064 option(LIMBA "Build Apper with Limba bundle support" OFF)
0065 set(HAVE_LIMBA ${LIMBA})
0066 message(STATUS "Building Apper with Limba support: " ${LIMBA})
0067 
0068 option(MAINTAINER "Enable maintainer mode" OFF)
0069 
0070 if(DEBCONF_SUPPORT)
0071     # Tries to find the package, when it finds it, set HAVE_DEBCONFKDE
0072     find_package(DebconfKDE REQUIRED)
0073     message(STATUS "Building with Debconf support")
0074     set(HAVE_DEBCONF ${DEBCONF_SUPPORT})
0075 endif(DEBCONF_SUPPORT)
0076 
0077 # command to edit the packages origins
0078 set(EDIT_ORIGNS_DESKTOP_NAME "" CACHE STRING "Edit origins desktop name")
0079 if (EDIT_ORIGNS_DESKTOP_NAME)
0080     message(STATUS "Edit origins desktop name: " ${EDIT_ORIGNS_DESKTOP_NAME})
0081 endif(EDIT_ORIGNS_DESKTOP_NAME)
0082 
0083 # Generate config.h
0084 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
0085                ${CMAKE_CURRENT_BINARY_DIR}/config.h)
0086 
0087 #
0088 # Add definitions
0089 #
0090 set(MAINTAINER_CFLAGS "")
0091 if(MAINTAINER)
0092     set(MAINTAINER_CFLAGS "-Werror -Wall -Wcast-align -Wno-uninitialized -Wempty-body -Wformat-security -Winit-self -Wno-deprecated-declarations")
0093     if (CMAKE_COMPILER_IS_GNUCC)
0094         execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
0095                 OUTPUT_VARIABLE GCC_VERSION)
0096         if (GCC_VERSION VERSION_GREATER 4.9 OR GCC_VERSION VERSION_EQUAL 4.9)
0097             set(MAINTAINER_CFLAGS ${MAINTAINER_CFLAGS} "-fdiagnostics-color=auto")
0098         endif()
0099     endif()
0100 endif(MAINTAINER)
0101 add_definitions(${MAINTAINER_CFLAGS})
0102 
0103 add_definitions(
0104   -DQT_USE_QSTRINGBUILDER
0105   -DQT_STRICT_ITERATORS
0106   -DQT_NO_URL_CAST_FROM_STRING
0107   -DQT_NO_CAST_FROM_BYTEARRAY
0108   -DQT_NO_SIGNALS_SLOTS_KEYWORDS
0109   -DQT_USE_FAST_OPERATOR_PLUS
0110   -DQT_NO_URL_CAST_FROM_STRING
0111   -DQT_NO_CAST_TO_ASCII
0112   -DQT_NO_CAST_FROM_ASCII
0113   -DQT_DISABLE_DEPRECATED_BEFORE=0x050900
0114 )
0115 
0116 #
0117 # Global includes
0118 #
0119 include_directories(${CMAKE_SOURCE_DIR}
0120     ${CMAKE_CURRENT_SOURCE_DIR}
0121     ${CMAKE_CURRENT_BINARY_DIR}
0122     ${PackageKitQt5_INCLUDE_DIR}
0123     ${CMAKE_CURRENT_SOURCE_DIR}/libapper)
0124 
0125 #
0126 # Subcomponents
0127 #
0128 add_subdirectory(libapper)
0129 if(BUILD_APPER)
0130     add_subdirectory(Apper)
0131 endif(BUILD_APPER)
0132 if(BUILD_PKSESSION)
0133     add_subdirectory(PkSession)
0134 endif(BUILD_PKSESSION)
0135 if(BUILD_APPERD)
0136     add_subdirectory(apperd)
0137 endif(BUILD_APPERD)
0138 if(BUILD_DECLARATIVE)
0139 #    add_subdirectory(declarative-plugins)
0140 endif(BUILD_DECLARATIVE)
0141 if(BUILD_PLASMOID)
0142 #    add_subdirectory(plasmoid)
0143 endif(BUILD_PLASMOID)
0144 if(LIMBA)
0145     add_subdirectory(AppSetup)
0146 endif()
0147 add_subdirectory(doc)
0148 
0149 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)