Warning, /sdk/kdesrc-build/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.16)
0002 project(kdesrc-build)
0003 
0004 include(FeatureSummary)
0005 
0006 # Needed for the docs, but optional. If not found, we will simply
0007 # defer to native CMake handling.
0008 find_package(ECM 5.10.0 NO_MODULE QUIET)
0009 
0010 if (ECM_FOUND)
0011     set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0012 
0013     include(KDEInstallDirs)
0014     include(KDECMakeSettings)
0015     include(ECMOptionalAddSubdirectory)
0016 
0017     find_package(KF5 5.10.0 COMPONENTS DocTools)
0018 
0019     if(KF5_DocTools_FOUND)
0020         ecm_optional_add_subdirectory(doc)
0021     else()
0022         message(WARNING "Found ECM, but not KF5::DocTools; documentation will not be built")
0023     endif()
0024 else()
0025     message(WARNING "Did not find extra-cmake-modules; documentation will not be built and install paths will be guessed based on CMake settings.")
0026     # ECM now sets KDE_INSTALL_DATADIR to PREFIX/share, try to match
0027     set(KDE_INSTALL_DATADIR  "${CMAKE_INSTALL_PREFIX}/share" CACHE PATH "The parent directory where applications can install their data")
0028     set(KDE_INSTALL_BINDIR   "${CMAKE_INSTALL_PREFIX}/bin"  CACHE PATH "The install dir for executables")
0029     set(KDE_INSTALL_METAINFODIR "${KDE_INSTALL_DATADIR}/metainfo" CACHE PATH "AppStream metadata directory")
0030 endif()
0031 # Added in ECM 5.101.0
0032 if (NOT DEFINED KDE_INSTALL_ZSHAUTOCOMPLETEDIR)
0033     set(KDE_INSTALL_ZSHAUTOCOMPLETEDIR "${KDE_INSTALL_DATADIR}/zsh/site-functions" CACHE PATH "Zsh functions and autocompletion definitions")
0034 endif()
0035 
0036 set(KDESRC_BUILD_INSTALL_MODULES TRUE CACHE BOOL "Controls whether to install the modules that make up the script. Leave enabled unless running straight from source")
0037 set(KDESRC_BUILD_MODULE_INSTALL_PREFIX "${KDE_INSTALL_DATADIR}/kdesrc-build/modules" CACHE PATH "Prefix to install the component Perl modules to. (This is only an option to allow for installing to vendor_perl or similar)")
0038 
0039 if (KDESRC_BUILD_INSTALL_MODULES)
0040     message(STATUS "Installing component modules to ${KDESRC_BUILD_MODULE_INSTALL_PREFIX}")
0041     install(DIRECTORY modules/
0042             DESTINATION ${KDESRC_BUILD_MODULE_INSTALL_PREFIX})
0043 endif()
0044 
0045 install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/kdesrc-build DESTINATION ${KDE_INSTALL_BINDIR})
0046 install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/kdesrc-build-setup DESTINATION ${KDE_INSTALL_BINDIR})
0047 install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/kdesrc-run DESTINATION ${KDE_INSTALL_BINDIR})
0048 
0049 install(PROGRAMS
0050             ${CMAKE_SOURCE_DIR}/sample-kde-env-master.sh
0051             ${CMAKE_SOURCE_DIR}/sample-xsession.sh
0052             ${CMAKE_SOURCE_DIR}/custom-qt5-libs-build-include
0053             ${CMAKE_SOURCE_DIR}/qt5-build-include
0054             ${CMAKE_SOURCE_DIR}/kf5-applications-build-include
0055             ${CMAKE_SOURCE_DIR}/kf5-common-options-build-include
0056             ${CMAKE_SOURCE_DIR}/kf5-extragear-build-include
0057             ${CMAKE_SOURCE_DIR}/kf5-frameworks-build-include
0058             ${CMAKE_SOURCE_DIR}/kf5-kdepim-build-include
0059             ${CMAKE_SOURCE_DIR}/kf5-qt5-build-include
0060             ${CMAKE_SOURCE_DIR}/kf5-workspace-build-include
0061             ${CMAKE_SOURCE_DIR}/custom-qt6-libs-build-include
0062             ${CMAKE_SOURCE_DIR}/qt6-build-include
0063             ${CMAKE_SOURCE_DIR}/kf6-applications-build-include
0064             ${CMAKE_SOURCE_DIR}/kf6-common-options-build-include
0065             ${CMAKE_SOURCE_DIR}/kf6-extragear-build-include
0066             ${CMAKE_SOURCE_DIR}/kf6-frameworks-build-include
0067             ${CMAKE_SOURCE_DIR}/kf6-kdepim-build-include
0068             ${CMAKE_SOURCE_DIR}/kf6-qt6-build-include
0069             ${CMAKE_SOURCE_DIR}/kf6-workspace-build-include
0070     DESTINATION ${KDE_INSTALL_DATADIR}/kdesrc-build)
0071 
0072 install(FILES org.kde.kdesrc-build.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0073 
0074 install(FILES
0075         completions/zsh/_kdesrc-build_modules
0076         completions/zsh/_kdesrc-build
0077         completions/zsh/_kdesrc-run
0078     DESTINATION ${KDE_INSTALL_ZSHAUTOCOMPLETEDIR})
0079 
0080 if (ECM_FOUND)
0081     feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
0082 endif()