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