Warning, /frameworks/kio/src/core/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 include (ConfigureChecks.cmake) 0002 0003 configure_file(config-kiocore.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kiocore.h ) 0004 0005 configure_file(config-kmountpoint.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kmountpoint.h) 0006 0007 # KSSL_HAVE_SSL only used in kssl/ksslsettings.cpp, but currently ifdefed out 0008 #find_package(OpenSSL) 0009 #set_package_properties(OpenSSL PROPERTIES DESCRIPTION "Support for secure network communications (SSL and TLS)" 0010 # URL "https://www.openssl.org/" 0011 # TYPE RECOMMENDED 0012 # PURPOSE "KDE uses OpenSSL for the bulk of secure communications, including secure web browsing via HTTPS" 0013 # ) 0014 #if(OPENSSL_FOUND) 0015 # set(KSSL_HAVE_SSL 1) 0016 # include_directories(${OPENSSL_INCLUDE_DIR}) 0017 #endif() 0018 0019 add_library(KF5KIOCore) 0020 add_library(KF5::KIOCore ALIAS KF5KIOCore) 0021 0022 set_target_properties(KF5KIOCore PROPERTIES 0023 VERSION ${KIO_VERSION} 0024 SOVERSION ${KIO_SOVERSION} 0025 EXPORT_NAME KIOCore 0026 ) 0027 0028 target_sources(KF5KIOCore PRIVATE 0029 idleslave.cpp 0030 connectionbackend.cpp 0031 connection.cpp 0032 connectionserver.cpp 0033 krecentdocument.cpp 0034 kfileitemlistproperties.cpp 0035 directorysizejob.cpp 0036 chmodjob.cpp 0037 kdiskfreespaceinfo.cpp 0038 usernotificationhandler.cpp 0039 ksambasharedata.cpp 0040 ksambashare.cpp 0041 knfsshare.cpp 0042 kfileitem.cpp 0043 davjob.cpp 0044 deletejob.cpp 0045 copyjob.cpp 0046 filejob.cpp 0047 mkdirjob.cpp 0048 mkpathjob.cpp 0049 kremoteencoding.cpp 0050 sessiondata.cpp 0051 slavebase.cpp 0052 workerbase.cpp 0053 dataworker.cpp 0054 dataprotocol.cpp 0055 desktopexecparser.cpp 0056 emptytrashjob.cpp 0057 authinfo.cpp 0058 slaveinterface.cpp 0059 slave.cpp 0060 job_error.cpp 0061 job.cpp 0062 filecopyjob.cpp 0063 listjob.cpp 0064 mimetypejob.cpp 0065 mimetypefinderjob.cpp 0066 multigetjob.cpp 0067 restorejob.cpp 0068 simplejob.cpp 0069 specialjob.cpp 0070 statjob.cpp 0071 namefinderjob.cpp 0072 storedtransferjob.cpp 0073 transferjob.cpp 0074 filesystemfreespacejob.cpp 0075 scheduler.cpp 0076 slaveconfig.cpp 0077 kprotocolmanager.cpp 0078 hostinfo.cpp 0079 kurlauthorized.cpp 0080 kacl.cpp 0081 udsentry.cpp 0082 global.cpp 0083 metadata.cpp 0084 kprotocolinfo.cpp 0085 kprotocolinfofactory.cpp 0086 jobtracker.cpp 0087 jobuidelegateextension.cpp 0088 jobuidelegatefactory.cpp 0089 askuseractioninterface.cpp 0090 kmountpoint.cpp 0091 kcoredirlister.cpp 0092 faviconscache.cpp 0093 untrustedprogramhandlerinterface.cpp 0094 kioglobal_p.cpp 0095 batchrenamejob.cpp 0096 workerconfig.cpp 0097 workerfactory.cpp 0098 workerthread.cpp 0099 kfilefilter.cpp 0100 ) 0101 0102 if (NOT ANDROID) 0103 target_sources(KF5KIOCore PRIVATE 0104 tcpslavebase.cpp 0105 tcpworkerbase.cpp 0106 forwardingslavebase.cpp 0107 kpasswdserverloop.cpp 0108 kpasswdserverclient.cpp 0109 kdirnotify.cpp 0110 forwardingworkerbase.cpp 0111 0112 ksslcertificatemanager.cpp 0113 ksslerroruidata.cpp 0114 ktcpsocket.cpp 0115 kssl/ksslsettings.cpp 0116 ) 0117 endif() 0118 0119 ecm_qt_declare_logging_category(KF5KIOCore 0120 HEADER kiocoredebug.h 0121 IDENTIFIER KIO_CORE 0122 CATEGORY_NAME kf.kio.core 0123 OLD_CATEGORY_NAMES kf5.kio.core 0124 DESCRIPTION "KIOCore (KIO)" 0125 EXPORT KIO 0126 ) 0127 0128 ecm_qt_export_logging_category( 0129 IDENTIFIER KIO_COPYJOB_DEBUG 0130 CATEGORY_NAME kf.kio.core.copyjob 0131 OLD_CATEGORY_NAMES kf5.kio.core.copyjob 0132 DEFAULT_SEVERITY Warning 0133 DESCRIPTION "KIO::CopyJob (KIO)" 0134 EXPORT KIO 0135 ) 0136 0137 ecm_qt_export_logging_category( 0138 IDENTIFIER KIO_CORE_DIRLISTER 0139 CATEGORY_NAME kf.kio.core.dirlister 0140 OLD_CATEGORY_NAMES kf5.kio.core.dirlister 0141 DEFAULT_SEVERITY Warning 0142 DESCRIPTION "KCoreDirLister (KIO)" 0143 EXPORT KIO 0144 ) 0145 0146 ecm_qt_export_logging_category( 0147 IDENTIFIER KIO_CORE_SAMBASHARE 0148 CATEGORY_NAME kf.kio.core.sambashare 0149 OLD_CATEGORY_NAMES kf5.kio.core.sambashare 0150 DEFAULT_SEVERITY Warning 0151 DESCRIPTION "sambashare (KIO)" 0152 EXPORT KIO 0153 ) 0154 0155 if (UNIX) 0156 target_sources(KF5KIOCore PRIVATE 0157 kioglobal_p_unix.cpp 0158 ) 0159 endif() 0160 if (WIN32) 0161 target_sources(KF5KIOCore PRIVATE 0162 kioglobal_p_win.cpp 0163 ) 0164 endif() 0165 0166 set(kiocore_dbus_SRCS) 0167 if (TARGET Qt${QT_MAJOR_VERSION}::DBus) 0168 qt_add_dbus_interface(kiocore_dbus_SRCS org.kde.KIOFuse.VFS.xml kiofuse_interface) 0169 0170 set_source_files_properties(org.kde.KPasswdServer.xml 0171 PROPERTIES INCLUDE authinfo.h 0172 ) 0173 qt_add_dbus_interface(kiocore_dbus_SRCS org.kde.KPasswdServer.xml kpasswdserver_interface) 0174 endif() 0175 0176 target_sources(KF5KIOCore PRIVATE 0177 ${kiocore_dbus_SRCS} 0178 ) 0179 0180 install(FILES 0181 org.kde.KDirNotify.xml 0182 DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR} 0183 RENAME kf5_org.kde.KDirNotify.xml) 0184 install(FILES 0185 org.kde.KPasswdServer.xml 0186 DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR} 0187 RENAME kf5_org.kde.KPasswdServer.xml) 0188 install(FILES 0189 org.kde.KSlaveLauncher.xml 0190 DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR} 0191 RENAME kf5_org.kde.KSlaveLauncher.xml) 0192 0193 ecm_generate_export_header(KF5KIOCore 0194 BASE_NAME KIOCore 0195 GROUP_BASE_NAME KF 0196 VERSION ${KF_VERSION} 0197 DEPRECATED_BASE_VERSION 0 0198 DEPRECATION_VERSIONS 3.0 3.1 3.4 4.0 4.3 4.5 4.6 5.0 5.2 5.8 5.24 5.45 5.48 5.63 5.61 5.64 5.65 5.66 5.69 5.72 5.78 5.79 5.80 5.81 5.82 5.83 5.84 5.86 5.88 5.90 5.91 5.94 5.96 5.97 5.98 5.100 5.101 5.102 5.103 0199 EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} 0200 ) 0201 # TODO: add support for EXCLUDE_DEPRECATED_BEFORE_AND_AT to all KIO libs 0202 # needs fixing of undeprecated API being still implemented using own deprecated API 0203 0204 target_include_directories(KF5KIOCore PUBLIC 0205 "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/..>" # kio_version.h 0206 "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/kssl>" 0207 ) 0208 0209 target_include_directories(KF5KIOCore INTERFACE 0210 "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KIOCore>" 0211 "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KIO>" 0212 ) 0213 0214 target_link_libraries(KF5KIOCore 0215 PUBLIC 0216 KF5::CoreAddons # KJob 0217 KF5::Service # TODO KF6 move to PRIVATE 0218 Qt${QT_MAJOR_VERSION}::Network 0219 PRIVATE 0220 Qt${QT_MAJOR_VERSION}::Xml # davjob.cpp uses QDom 0221 KF5::ConfigCore 0222 KF5::I18n 0223 ) 0224 0225 if (NOT ANDROID) 0226 target_link_libraries(KF5KIOCore PRIVATE KF5::Crash) 0227 endif() 0228 0229 if (TARGET Qt${QT_MAJOR_VERSION}::DBus) 0230 target_link_libraries(KF5KIOCore 0231 PUBLIC 0232 Qt${QT_MAJOR_VERSION}::DBus 0233 PRIVATE 0234 KF5::DBusAddons # KDEInitInterface 0235 ) 0236 endif() 0237 0238 if(KIO_NO_PUBLIC_QTCONCURRENT) 0239 target_link_libraries(KF5KIOCore PRIVATE Qt${QT_MAJOR_VERSION}::Concurrent) # QtConcurrentRun in hostinfo.cpp 0240 else() 0241 target_link_libraries(KF5KIOCore PUBLIC Qt${QT_MAJOR_VERSION}::Concurrent) # TODO KF6: remove 0242 endif() 0243 0244 if (TARGET KF5::AuthCore) 0245 target_link_libraries(KF5KIOCore PRIVATE KF5::AuthCore) #SlaveBase uses KAuth::Action 0246 endif() 0247 0248 if(ACL_FOUND) 0249 target_link_libraries(KF5KIOCore PRIVATE ${ACL_LIBS}) 0250 endif() 0251 0252 if(HAVE_LIB_MOUNT) 0253 target_link_libraries(KF5KIOCore PRIVATE LibMount::LibMount) 0254 endif() 0255 0256 if (TARGET Qt6::Core5Compat) 0257 target_link_libraries(KF5KIOCore PRIVATE Qt6::Core5Compat) # QTextCodec 0258 endif() 0259 0260 # this should be done by cmake, see bug 371721 0261 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_GREATER 5.8.0) 0262 add_custom_command( 0263 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/moc_predefs.h 0264 COMMAND "${CMAKE_CXX_COMPILER}" "${CMAKE_CXX_COMPILER_ARG1}" "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp" > ${CMAKE_CURRENT_BINARY_DIR}/moc_predefs.h 0265 ) 0266 set_property(TARGET KF5KIOCore APPEND PROPERTY AUTOMOC_MOC_OPTIONS --include ${CMAKE_CURRENT_BINARY_DIR}/moc_predefs.h) 0267 set_property(TARGET KF5KIOCore APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_predefs.h) 0268 endif() 0269 0270 # Headers prefixed with KIO/ 0271 ecm_generate_headers(KIOCore_CamelCase_HEADERS 0272 HEADER_NAMES 0273 IdleSlave 0274 ConnectionServer 0275 TCPSlaveBase 0276 TCPWorkerBase 0277 DirectorySizeJob 0278 ForwardingSlaveBase 0279 Job # ### should forward to job_base.h, not job.h... 0280 JobTracker 0281 Global 0282 ChmodJob 0283 DeleteJob 0284 CopyJob 0285 EmptyTrashJob 0286 FileJob 0287 MkdirJob 0288 MkpathJob 0289 SlaveBase 0290 SlaveConfig 0291 HostInfo 0292 MetaData 0293 UDSEntry 0294 JobUiDelegateExtension 0295 JobUiDelegateFactory 0296 AskUserActionInterface 0297 SlaveInterface 0298 Slave 0299 FileCopyJob 0300 ListJob 0301 MimetypeJob 0302 MimeTypeFinderJob 0303 MultiGetJob 0304 RestoreJob 0305 SimpleJob 0306 SpecialJob 0307 StatJob 0308 NameFinderJob 0309 StoredTransferJob 0310 TransferJob 0311 Scheduler 0312 AuthInfo 0313 DavJob 0314 DesktopExecParser 0315 FileSystemFreeSpaceJob 0316 BatchRenameJob 0317 WorkerBase 0318 WorkerFactory 0319 ForwardingWorkerBase 0320 0321 PREFIX KIO 0322 REQUIRED_HEADERS KIO_namespaced_HEADERS 0323 ) 0324 0325 # Create local forwarding header for kio/job_base.h 0326 set(REGULAR_HEADER_NAME ${CMAKE_CURRENT_BINARY_DIR}/kio/job_base.h) 0327 if (NOT EXISTS ${REGULAR_HEADER_NAME}) 0328 file(WRITE ${REGULAR_HEADER_NAME} "#include \"${CMAKE_CURRENT_SOURCE_DIR}/job_base.h\"\n") 0329 endif() 0330 0331 0332 install(TARGETS KF5KIOCore EXPORT KF5KIOTargets ${KF_INSTALL_TARGETS_DEFAULT_ARGS}) 0333 0334 list(APPEND KIO_namespaced_HEADERS 0335 http_worker_defaults.h 0336 ioworker_defaults.h 0337 job_base.h 0338 jobclasses.h 0339 ) 0340 if(NOT EXCLUDE_DEPRECATED_BEFORE_AND_AT STREQUAL "CURRENT" AND 0341 EXCLUDE_DEPRECATED_BEFORE_AND_AT VERSION_LESS 5.101.0) 0342 list(APPEND KIO_namespaced_HEADERS 0343 ioslave_defaults.h 0344 http_slave_defaults.h 0345 ) 0346 endif() 0347 0348 install(FILES 0349 ${KIO_namespaced_HEADERS} 0350 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KIOCore/kio COMPONENT Devel 0351 ) 0352 0353 # Headers not prefixed with KIO/ 0354 ecm_generate_headers(KIOCore_HEADERS 0355 HEADER_NAMES 0356 KACL 0357 KUrlAuthorized 0358 KCoreDirLister 0359 KRemoteEncoding 0360 KDirNotify 0361 KDiskFreeSpaceInfo 0362 KFileItem 0363 KFileItemListProperties 0364 KMountPoint 0365 KNFSShare 0366 KSambaShare 0367 KSambaShareData 0368 KPasswdServerClient 0369 KProtocolInfo 0370 KProtocolManager 0371 KRecentDocument 0372 KSslCertificateManager 0373 KSslErrorUiData 0374 KTcpSocket 0375 KFileFilter 0376 0377 REQUIRED_HEADERS KIOCore_HEADERS 0378 ) 0379 0380 ecm_generate_headers(KIOCore_HEADERS 0381 HEADER_NAMES 0382 KSSLSettings 0383 0384 RELATIVE kssl 0385 REQUIRED_HEADERS KIOCore_HEADERS 0386 ) 0387 install(FILES ${KIOCore_CamelCase_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KIOCore/KIO COMPONENT Devel) 0388 0389 install(FILES 0390 ksslcertificatemanager_p.h 0391 ${KIOCore_HEADERS} 0392 ${CMAKE_CURRENT_BINARY_DIR}/kiocore_export.h 0393 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KIOCore COMPONENT Devel) 0394 0395 install(FILES accept-languages.codes DESTINATION ${KDE_INSTALL_CONFDIR}) 0396 0397 # make available to ecm_add_qch in parent folder 0398 set(KIOCore_QCH_SOURCES ${KIOCore_HEADERS} ${KIO_namespaced_HEADERS} PARENT_SCOPE) 0399 0400 include(ECMGeneratePriFile) 0401 ecm_generate_pri_file( 0402 BASE_NAME KIOCore 0403 LIB_NAME KF5KIOCore 0404 DEPS "KCoreAddons KService" 0405 FILENAME_VAR PRI_FILENAME 0406 INCLUDE_INSTALL_DIRS 0407 ${KDE_INSTALL_INCLUDEDIR_KF}/KIO 0408 ${KDE_INSTALL_INCLUDEDIR_KF}/KIOCore 0409 ) 0410 install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})