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 add_library(KF6KIOCore)
0008 add_library(KF6::KIOCore ALIAS KF6KIOCore)
0009 
0010 set_target_properties(KF6KIOCore PROPERTIES
0011     VERSION     ${KIO_VERSION}
0012     SOVERSION   ${KIO_SOVERSION}
0013     EXPORT_NAME KIOCore
0014 )
0015 
0016 target_sources(KF6KIOCore PRIVATE
0017   connectionbackend.cpp
0018   connection.cpp
0019   connectionserver.cpp
0020   krecentdocument.cpp
0021   krecentdirs.cpp
0022   kfileitemlistproperties.cpp
0023   directorysizejob.cpp
0024   chmodjob.cpp
0025   usernotificationhandler.cpp
0026   ksambasharedata.cpp
0027   ksambashare.cpp
0028   knfsshare.cpp
0029   kfileitem.cpp
0030   davjob.cpp
0031   deletejob.cpp
0032   copyjob.cpp
0033   filejob.cpp
0034   mkdirjob.cpp
0035   mkpathjob.cpp
0036   kremoteencoding.cpp
0037   sessiondata.cpp
0038   slavebase.cpp
0039   workerbase.cpp
0040   dataworker.cpp
0041   dataprotocol.cpp
0042   desktopexecparser.cpp
0043   emptytrashjob.cpp
0044   authinfo.cpp
0045   job_error.cpp
0046   job.cpp
0047   filecopyjob.cpp
0048   listjob.cpp
0049   mimetypejob.cpp
0050   mimetypefinderjob.cpp
0051   restorejob.cpp
0052   simplejob.cpp
0053   specialjob.cpp
0054   statjob.cpp
0055   namefinderjob.cpp
0056   storedtransferjob.cpp
0057   transferjob.cpp
0058   filesystemfreespacejob.cpp
0059   scheduler.cpp
0060   kprotocolmanager.cpp
0061   hostinfo.cpp
0062   kurlauthorized.cpp
0063   kacl.cpp
0064   udsentry.cpp
0065   global.cpp
0066   metadata.cpp
0067   kprotocolinfo.cpp
0068   kprotocolinfofactory.cpp
0069   jobtracker.cpp
0070   jobuidelegateextension.cpp
0071   jobuidelegatefactory.cpp
0072   askuseractioninterface.cpp
0073   kmountpoint.cpp
0074   kcoredirlister.cpp
0075   faviconscache.cpp
0076   untrustedprogramhandlerinterface.cpp
0077   kioglobal_p.cpp
0078   batchrenamejob.cpp
0079   worker.cpp
0080   workerinterface.cpp
0081   workerconfig.cpp
0082   workerfactory.cpp
0083   workerthread.cpp
0084   kfilefilter.cpp
0085   koverlayiconplugin.cpp
0086 )
0087 
0088 if (NOT ANDROID)
0089 target_sources(KF6KIOCore PRIVATE
0090   kpasswdserverloop.cpp
0091   kpasswdserverclient.cpp
0092   kdirnotify.cpp
0093   forwardingworkerbase.cpp
0094 
0095   ksslcertificatemanager.cpp
0096   ksslerroruidata.cpp
0097 )
0098 endif()
0099 
0100 ecm_qt_declare_logging_category(KF6KIOCore
0101     HEADER kiocoredebug.h
0102     IDENTIFIER KIO_CORE
0103     CATEGORY_NAME kf.kio.core
0104     OLD_CATEGORY_NAMES kf5.kio.core
0105     DESCRIPTION "KIOCore (KIO)"
0106     EXPORT KIO
0107 )
0108 
0109 ecm_qt_export_logging_category(
0110     IDENTIFIER KIO_COPYJOB_DEBUG
0111     CATEGORY_NAME kf.kio.core.copyjob
0112     OLD_CATEGORY_NAMES kf5.kio.core.copyjob
0113     DEFAULT_SEVERITY Warning
0114     DESCRIPTION "KIO::CopyJob (KIO)"
0115     EXPORT KIO
0116 )
0117 
0118 ecm_qt_export_logging_category(
0119     IDENTIFIER KIO_CORE_DIRLISTER
0120     CATEGORY_NAME kf.kio.core.dirlister
0121     OLD_CATEGORY_NAMES kf5.kio.core.dirlister
0122     DEFAULT_SEVERITY Warning
0123     DESCRIPTION "KCoreDirLister (KIO)"
0124     EXPORT KIO
0125 )
0126 
0127 ecm_qt_export_logging_category(
0128     IDENTIFIER KIO_CORE_SAMBASHARE
0129     CATEGORY_NAME kf.kio.core.sambashare
0130     OLD_CATEGORY_NAMES kf5.kio.core.sambashare
0131     DEFAULT_SEVERITY Warning
0132     DESCRIPTION "sambashare (KIO)"
0133     EXPORT KIO
0134 )
0135 
0136 if (UNIX)
0137    target_sources(KF6KIOCore PRIVATE
0138       kioglobal_p_unix.cpp
0139    )
0140 endif()
0141 if (WIN32)
0142    target_sources(KF6KIOCore PRIVATE
0143       kioglobal_p_win.cpp
0144    )
0145 endif()
0146 
0147 set(kiocore_dbus_SRCS)
0148 if (TARGET Qt6::DBus)
0149     qt_add_dbus_interface(kiocore_dbus_SRCS org.kde.KIOFuse.VFS.xml kiofuse_interface)
0150 
0151     set_source_files_properties(org.kde.KPasswdServer.xml
0152             PROPERTIES INCLUDE authinfo.h
0153     )
0154     qt_add_dbus_interface(kiocore_dbus_SRCS org.kde.KPasswdServer.xml kpasswdserver_interface)
0155 endif()
0156 
0157 target_sources(KF6KIOCore PRIVATE
0158     ${kiocore_dbus_SRCS}
0159 )
0160 
0161 ecm_generate_export_header(KF6KIOCore
0162     BASE_NAME KIOCore
0163     GROUP_BASE_NAME KF
0164     VERSION ${KF_VERSION}
0165     USE_VERSION_HEADER
0166     VERSION_BASE_NAME KIO
0167     DEPRECATED_BASE_VERSION 0
0168     DEPRECATION_VERSIONS 5.101
0169     EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
0170 )
0171 
0172 target_include_directories(KF6KIOCore PUBLIC
0173   "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/..>" # kio_version.h
0174 )
0175 
0176 target_include_directories(KF6KIOCore INTERFACE
0177     "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KIOCore>"
0178     "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KIO>"
0179 )
0180 
0181 target_link_libraries(KF6KIOCore
0182 PUBLIC
0183  KF6::CoreAddons   # KJob
0184  Qt6::Network
0185 PRIVATE
0186  Qt6::Xml # davjob.cpp uses QDom
0187  Qt6::Concurrent
0188  KF6::ConfigCore
0189  KF6::I18n
0190  KF6::Service
0191 )
0192 
0193 if (NOT ANDROID)
0194     target_link_libraries(KF6KIOCore PRIVATE KF6::Crash)
0195 endif()
0196 
0197 if (TARGET Qt6::DBus)
0198     target_link_libraries(KF6KIOCore
0199     PUBLIC
0200         Qt6::DBus
0201     )
0202 endif()
0203 
0204 if (TARGET KF6::AuthCore)
0205   target_link_libraries(KF6KIOCore PRIVATE KF6::AuthCore)   #SlaveBase uses KAuth::Action
0206 endif()
0207 
0208 if(ACL_FOUND)
0209   target_link_libraries(KF6KIOCore PRIVATE ${ACL_LIBS})
0210 endif()
0211 
0212 if(HAVE_LIB_MOUNT)
0213   target_link_libraries(KF6KIOCore PRIVATE LibMount::LibMount)
0214 endif()
0215 
0216 # this should be done by cmake, see bug 371721
0217 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
0218     add_custom_command(
0219         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/moc_predefs.h
0220         COMMAND "${CMAKE_CXX_COMPILER}" "${CMAKE_CXX_COMPILER_ARG1}" "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp" > ${CMAKE_CURRENT_BINARY_DIR}/moc_predefs.h
0221     )
0222     set_property(TARGET KF6KIOCore APPEND PROPERTY AUTOMOC_MOC_OPTIONS --include ${CMAKE_CURRENT_BINARY_DIR}/moc_predefs.h)
0223     set_property(TARGET KF6KIOCore APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_predefs.h)
0224 endif()
0225 
0226 # Headers prefixed with KIO/
0227 ecm_generate_headers(KIOCore_CamelCase_HEADERS
0228   HEADER_NAMES
0229   DirectorySizeJob
0230   Job #     ### should forward to job_base.h, not job.h...
0231   JobTracker
0232   Global
0233   ChmodJob
0234   DeleteJob
0235   CopyJob
0236   EmptyTrashJob
0237   FileJob
0238   MkdirJob
0239   MkpathJob
0240   MetaData
0241   UDSEntry
0242   JobUiDelegateExtension
0243   JobUiDelegateFactory
0244   AskUserActionInterface
0245   FileCopyJob
0246   ListJob
0247   MimetypeJob
0248   MimeTypeFinderJob
0249   RestoreJob
0250   SimpleJob
0251   SpecialJob
0252   StatJob
0253   NameFinderJob
0254   StoredTransferJob
0255   TransferJob
0256   AuthInfo
0257   DavJob
0258   DesktopExecParser
0259   FileSystemFreeSpaceJob
0260   BatchRenameJob
0261   WorkerBase
0262   WorkerFactory
0263   ForwardingWorkerBase
0264   UntrustedProgramHandlerInterface
0265 
0266   PREFIX KIO
0267   REQUIRED_HEADERS KIO_namespaced_HEADERS
0268 )
0269 
0270 # Create local forwarding header for kio/job_base.h
0271 set(REGULAR_HEADER_NAME ${CMAKE_CURRENT_BINARY_DIR}/kio/job_base.h)
0272 if (NOT EXISTS ${REGULAR_HEADER_NAME})
0273    file(WRITE ${REGULAR_HEADER_NAME} "#include \"${CMAKE_CURRENT_SOURCE_DIR}/job_base.h\"\n")
0274 endif()
0275 
0276 
0277 install(TARGETS KF6KIOCore EXPORT KF6KIOTargets ${KF_INSTALL_TARGETS_DEFAULT_ARGS})
0278 
0279 list(APPEND KIO_namespaced_HEADERS
0280   ioworker_defaults.h
0281   job_base.h
0282 )
0283 
0284 install(FILES
0285   ${KIO_namespaced_HEADERS}
0286   DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KIOCore/kio COMPONENT Devel
0287 )
0288 
0289 # Headers not prefixed with KIO/
0290 ecm_generate_headers(KIOCore_HEADERS
0291   HEADER_NAMES
0292   KACL
0293   KUrlAuthorized
0294   KCoreDirLister
0295   KRemoteEncoding
0296   KDirNotify
0297   KFileItem
0298   KFileItemListProperties
0299   KMountPoint
0300   KSambaShare
0301   KSambaShareData
0302   KPasswdServerClient
0303   KProtocolInfo
0304   KProtocolManager
0305   KRecentDocument
0306   KRecentDirs
0307   KSslErrorUiData
0308   KFileFilter
0309   KOverlayIconPlugin
0310 
0311   REQUIRED_HEADERS KIOCore_HEADERS
0312 )
0313 
0314 install(FILES ${KIOCore_CamelCase_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KIOCore/KIO COMPONENT Devel)
0315 
0316 install(FILES
0317   ${KIOCore_HEADERS}
0318   ${CMAKE_CURRENT_BINARY_DIR}/kiocore_export.h
0319   DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KIOCore COMPONENT Devel)
0320 
0321 # make available to ecm_add_qch in parent folder
0322 set(KIOCore_QCH_SOURCES ${KIOCore_HEADERS} ${KIO_namespaced_HEADERS} PARENT_SCOPE)
0323