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

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 project(Okteta VERSION 0.26.60)
0004 
0005 set(REQUIRED_KF5_VERSION "5.91.0")
0006 find_package(ECM ${REQUIRED_KF5_VERSION} REQUIRED NO_MODULE)
0007 
0008 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
0009 
0010 # ECM KDE macros (include first, to have their policies and settings effect all other macros)
0011 include(KDEInstallDirs)
0012 include(KDECMakeSettings NO_POLICY_SCOPE)
0013 include(KDECompilerSettings NO_POLICY_SCOPE)
0014 # ECM macros
0015 include(ECMQtDeclareLoggingCategory)
0016 include(ECMInstallIcons)
0017 include(ECMAddAppIcon)
0018 # CMake macros
0019 include(FeatureSummary)
0020 include(CMakeDependentOption)
0021 if(BUILD_TESTING)
0022     include(ECMAddTests)
0023 endif()
0024 # Okteta macros
0025 include(OktetaInternalMacros)
0026 
0027 # control build scope, default to examples if BUILD_TESTING is ON
0028 if( NOT DEFINED OMIT_EXAMPLES AND NOT BUILD_TESTING )
0029     set( OMIT_EXAMPLES TRUE )
0030 endif()
0031 if( NOT DEFINED OMIT_INTERNAL_TEMPLATES AND NOT BUILD_TESTING )
0032     set( OMIT_INTERNAL_TEMPLATES TRUE )
0033 endif()
0034 
0035 if( NOT OMIT_EXAMPLES )
0036     set( OKTETA_BUILD_EXAMPLES TRUE )
0037 endif()
0038 if( NOT OMIT_INTERNAL_TEMPLATES )
0039     set( KASTEN_BUILD_INTERNAL_TEMPLATES TRUE )
0040 endif()
0041 
0042 option(BUILD_DESIGNERPLUGIN "Build the Designer plugin." ON)
0043 add_feature_info(DESIGNERPLUGIN ${BUILD_DESIGNERPLUGIN} "Qt Designer plugin")
0044 option(BUILD_OKTETAKASTENLIBS "Build the Okteta Kasten libraries." ON)
0045 add_feature_info(OKTETAKASTENLIBS ${BUILD_OKTETAKASTENLIBS} "Okteta Kasten libraries")
0046 
0047 cmake_dependent_option(BUILD_KPARTSPLUGIN "Build the KParts plugin." ON "BUILD_OKTETAKASTENLIBS" OFF)
0048 add_feature_info(KPARTSPLUGIN ${BUILD_KPARTSPLUGIN} "KParts plugin")
0049 cmake_dependent_option(BUILD_DESKTOPPROGRAM "Build the program." ON "BUILD_OKTETAKASTENLIBS" OFF)
0050 add_feature_info(DESKTOPPROGRAM ${BUILD_DESKTOPPROGRAM} "Program")
0051 
0052 set(REQUIRED_QT_VERSION "5.15.0")
0053 set(ADDITIONAL_REQUIRED_QT_COMPONENTS)
0054 if(BUILD_TESTING)
0055     list(APPEND ADDITIONAL_REQUIRED_QT_COMPONENTS Test)
0056 endif()
0057 if( BUILD_DESIGNERPLUGIN )
0058     list(APPEND ADDITIONAL_REQUIRED_QT_COMPONENTS UiPlugin)
0059 endif()
0060 if( BUILD_OKTETAKASTENLIBS )
0061     list(APPEND ADDITIONAL_REQUIRED_QT_COMPONENTS
0062         Network
0063         PrintSupport
0064         Qml
0065         Script
0066         ScriptTools
0067         Xml
0068     )
0069 endif()
0070 find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED
0071     COMPONENTS
0072     Core
0073     Widgets
0074     ${ADDITIONAL_REQUIRED_QT_COMPONENTS}
0075 )
0076 
0077 set(ADDITIONAL_REQUIRED_KF_COMPONENTS)
0078 if( BUILD_OKTETAKASTENLIBS )
0079     list(APPEND ADDITIONAL_REQUIRED_KF_COMPONENTS
0080         Bookmarks
0081         Completion
0082         IconThemes
0083         ItemViews
0084         KIO
0085         NewStuff
0086         Parts
0087         Service
0088         WidgetsAddons
0089         XmlGui
0090     )
0091 endif()
0092 if( BUILD_DESKTOPPROGRAM )
0093     list(APPEND ADDITIONAL_REQUIRED_KF_COMPONENTS
0094         Crash
0095         DBusAddons
0096         DocTools
0097     )
0098 endif()
0099 find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED
0100     COMPONENTS
0101     Codecs
0102     ConfigWidgets
0103     I18n
0104     ${ADDITIONAL_REQUIRED_KF_COMPONENTS}
0105 )
0106 
0107 find_package(Qca-qt5 2.1.0)
0108 set_package_properties(Qca-qt5 PROPERTIES
0109     DESCRIPTION "Qt Cryptographic Architecture"
0110     URL "https://commits.kde.org/qca"
0111     TYPE OPTIONAL
0112     PURPOSE "Needed for most of the algorithms of the checksum tool"
0113 )
0114 
0115 add_definitions(
0116     -DQT_DISABLE_DEPRECATED_BEFORE=0x050E00
0117     -DQT_DEPRECATED_WARNINGS_SINCE=0x060000
0118     -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055400
0119     -DKF_DEPRECATED_WARNINGS_SINCE=0x060000
0120 )
0121 
0122 # helper libs
0123 add_subdirectory( libs )
0124 if( BUILD_DESKTOPPROGRAM )
0125     add_subdirectory( doc )
0126 endif()
0127 
0128 set( OKTETALIBS_MAJOR_VERSION 0 )
0129 set( OKTETALIBS_MINOR_VERSION 10 )
0130 set( OKTETALIBS_PATCHLEVEL_VERSION 0 )
0131 set( OKTETALIBS_VERSION "${OKTETALIBS_MAJOR_VERSION}.${OKTETALIBS_MINOR_VERSION}.${OKTETALIBS_PATCHLEVEL_VERSION}" )
0132 set( OKTETALIBS_ABI_VERSION 3 )
0133 
0134 set( OKTETALIBS_LIB_SOVERSION 0 )
0135 set( OKTETALIBS_LIB_VERSION ${OKTETALIBS_VERSION} )
0136 
0137 # Okteta libs
0138 add_subdirectory( core )
0139 add_subdirectory( gui )
0140 
0141 if( BUILD_DESIGNERPLUGIN )
0142     add_subdirectory( designer )
0143 endif()
0144 
0145 # Okteta Kasten components
0146 if( BUILD_OKTETAKASTENLIBS )
0147     add_subdirectory( kasten )
0148 endif()
0149 # special mimetypes
0150 if( BUILD_OKTETAKASTENLIBS )
0151     add_subdirectory( mimetypes )
0152 endif()
0153 
0154 # programs and parts for desktop
0155 add_subdirectory( parts )
0156 if( BUILD_DESKTOPPROGRAM )
0157     add_subdirectory( program )
0158 endif()
0159 
0160 ki18n_install(po)
0161 
0162 if( BUILD_DESKTOPPROGRAM )
0163     kdoctools_install(po)
0164 endif()
0165 
0166 ecm_qt_install_logging_categories(
0167     EXPORT OKTETA
0168     FILE okteta.categories
0169     DESTINATION "${KDE_INSTALL_LOGGINGCATEGORIESDIR}"
0170 )
0171 
0172 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)