Warning, /network/smb4k/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 project(smb4k) 0002 0003 set(VERSION_MAJOR 3) 0004 set(VERSION_MINOR 0) 0005 set(VERSION_PATCH 7) 0006 0007 set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) 0008 0009 # Minimum required CMake version 0010 cmake_minimum_required(VERSION 3.2 FATAL_ERROR) 0011 0012 # CMake policies 0013 cmake_policy(SET CMP0037 NEW) 0014 0015 if (POLICY CMP0071) 0016 cmake_policy(SET CMP0071 NEW) 0017 endif() 0018 0019 # Minimum required versions of Qt5 and KF5 0020 set(QT_MIN_VERSION "5.6.0") 0021 set(KF5_MIN_VERSION "5.25.0") 0022 0023 if(KF5_VERSION VERSION_GREATER "5.55.0") 0024 set(AUTHLIB KF5::AuthCore) 0025 else() 0026 set(AUTHLIB KF5::Auth) 0027 endif() 0028 0029 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) 0030 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake/) 0031 0032 include(KDEInstallDirs) 0033 include(KDECompilerSettings NO_POLICY_SCOPE) 0034 include(KDECMakeSettings) 0035 include(FeatureSummary) 0036 include(ECMInstallIcons) 0037 0038 # Qt5 modules 0039 find_package(Qt5Core ${QT_MIN_VERSION} REQUIRED) 0040 find_package(Qt5Gui ${QT_MIN_VERSION} REQUIRED) 0041 find_package(Qt5Network ${QT_MIN_VERSION} REQUIRED) 0042 find_package(Qt5PrintSupport ${QT_MIN_VERSION} REQUIRED) 0043 find_package(Qt5Qml ${QT_MIN_VERSION} REQUIRED) 0044 find_package(Qt5Test ${QT_MIN_VERSION} REQUIRED) 0045 find_package(Qt5Widgets ${QT_MIN_VERSION} REQUIRED) 0046 0047 # KF5 modules 0048 find_package(KF5Auth ${KF5_MIN_VERSION} REQUIRED) 0049 find_package(KF5Completion ${KF5_MIN_VERSION} REQUIRED) 0050 find_package(KF5Config ${KF5_MIN_VERSION} REQUIRED) 0051 find_package(KF5ConfigWidgets ${KF5_MIN_VERSION} REQUIRED) 0052 find_package(KF5CoreAddons ${KF5_MIN_VERSION} REQUIRED) 0053 find_package(KF5DBusAddons ${KF5_MIN_VERSION} REQUIRED) 0054 find_package(KF5DocTools ${KF5_MIN_VERSION} REQUIRED) 0055 find_package(KF5I18n ${KF5_MIN_VERSION} REQUIRED) 0056 find_package(KF5IconThemes ${KF5_MIN_VERSION} REQUIRED) 0057 find_package(KF5JobWidgets ${KF5_MIN_VERSION} REQUIRED) 0058 find_package(KF5KIO ${KF5_MIN_VERSION} REQUIRED) 0059 find_package(KF5Notifications ${KF5_MIN_VERSION} REQUIRED) 0060 find_package(KF5Solid ${KF5_MIN_VERSION} REQUIRED) 0061 find_package(KF5Wallet ${KF5_MIN_VERSION} REQUIRED) 0062 find_package(KF5WidgetsAddons ${KF5_MIN_VERSION} REQUIRED) 0063 find_package(KF5WindowSystem ${KF5_MIN_VERSION} REQUIRED) 0064 find_package(KF5XmlGui ${KF5_MIN_VERSION} REQUIRED) 0065 find_package(KF5Crash ${KF5_MIN_VERSION} REQUIRED) 0066 0067 find_package(KF5Plasma ${KF5_MIN_VERSION}) 0068 set_package_properties(KF5Plasma PROPERTIES TYPE RUNTIME) 0069 0070 # Find libsmbclient.h 0071 find_package(Libsmbclient REQUIRED MODULE) 0072 0073 # Make sure that Smb4K builds when several custom targets 0074 # with the same name exist (happens in the po directory). 0075 if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po") 0076 set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS ON) 0077 endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po") 0078 0079 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake 0080 ${CMAKE_CURRENT_BINARY_DIR}/config.h) 0081 0082 # Make sure that all libraries, plugins, etc. are installed 0083 # into the right place. 0084 set(KDE_INSTALL_USE_QT_SYS_PATHS ON CACHE BOOLEAN "Use Qt system paths for installation" FORCE) 0085 0086 # Add subdirectories 0087 add_subdirectory(core) 0088 add_subdirectory(helpers) 0089 add_subdirectory(smb4k) 0090 add_subdirectory(data) 0091 add_subdirectory(doc) 0092 0093 if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po") 0094 ki18n_install(po) 0095 if(KF5DocTools_FOUND) 0096 kdoctools_install(po) 0097 endif(KF5DocTools_FOUND) 0098 endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po") 0099 0100 # Install the header files if desired 0101 option(INSTALL_HEADER_FILES "Install header files" OFF) 0102 0103 if (INSTALL_HEADER_FILES) 0104 message(STATUS "Installing core header files (-DINSTALL_HEADER_FILES=false to disable)") 0105 elseif (NOT INSTALL_HEADER_FILES) 0106 message(STATUS "Not installing core header files (-DINSTALL_HEADER_FILES=true to enable)") 0107 endif(INSTALL_HEADER_FILES) 0108 0109 # Do not install the plasmoid if not desired 0110 option(INSTALL_PLASMOID "Install the plasmoid" ON) 0111 0112 if (INSTALL_PLASMOID) 0113 message(STATUS "Installing plasmoid (-DINSTALL_PLASMOID=false to disable)") 0114 add_subdirectory(plasmoid) 0115 elseif(NOT INSTALL_PLASMOID) 0116 message(STATUS "Not installing plasmoid (-DINSTALL_PLASMOID=true to enable)") 0117 endif(INSTALL_PLASMOID) 0118 0119 ########### install files ############### 0120 0121 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)