Warning, /frameworks/kio/src/ioslaves/trash/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # find_package(Strigi)
0002 # set_package_properties(Strigi PROPERTIES DESCRIPTION "Desktop indexing and search support"
0003 #                        URL "http://strigi.sourceforge.net"
0004 #                        TYPE ${STRIGI_TYPE}
0005 #                       )
0006 # if (WIN32)
0007 #     set (STRIGI_TYPE "OPTIONAL")
0008 # else ()
0009 #     set (STRIGI_TYPE "REQUIRED")
0010 # endif ()
0011 
0012 if(BUILD_TESTING)
0013   if(WIN32)
0014     message(AUTHOR_WARNING "kio_trash unit tests are broken on Windows, disabling them")
0015   else()
0016     add_subdirectory(tests)
0017   endif()
0018 endif()
0019 
0020 ########### next target ###############
0021 ecm_qt_declare_logging_category(kio_trash_PART_DEBUG_SRCS
0022     HEADER kiotrashdebug.h
0023     IDENTIFIER KIO_TRASH
0024     CATEGORY_NAME kf.kio.workers.trash
0025     OLD_CATEGORY_NAMES kf5.kio.trash kf.kio.slaves.trash
0026     DESCRIPTION "kio trash (KIO)"
0027     EXPORT KIO
0028 )
0029 kcoreaddons_add_plugin(kio_trash INSTALL_NAMESPACE "kf${QT_MAJOR_VERSION}/kio")
0030 
0031 if(WIN32)
0032     target_sources(kio_trash PRIVATE
0033         kio_trash_win.cpp
0034         ${kio_trash_PART_DEBUG_SRCS}
0035     )
0036 else()
0037     # Files that are shared with the KCM. Unix specific.
0038     add_library(trash_common_unix INTERFACE)
0039     target_sources(trash_common_unix INTERFACE
0040         ${CMAKE_CURRENT_SOURCE_DIR}/trashimpl.cpp
0041         ${CMAKE_CURRENT_SOURCE_DIR}/discspaceutil.cpp
0042         ${CMAKE_CURRENT_SOURCE_DIR}/trashsizecache.cpp
0043         ${CMAKE_CURRENT_SOURCE_DIR}/kinterprocesslock.cpp
0044         ${kio_trash_PART_DEBUG_SRCS}
0045     )
0046     target_link_libraries(kio_trash trash_common_unix)
0047 
0048     target_sources(kio_trash PRIVATE
0049         kio_trash.cpp
0050     )
0051 endif()
0052 
0053 target_link_libraries(kio_trash
0054   KF5::ConfigCore
0055   KF5::Solid
0056   KF5::KIOCore
0057   Qt${QT_MAJOR_VERSION}::DBus
0058   Qt${QT_MAJOR_VERSION}::Network
0059   KF5::I18n
0060   KF5::ConfigCore
0061 )
0062 if(APPLE)
0063     target_link_libraries(kio_trash "-framework DiskArbitration -framework CoreFoundation")
0064 endif(APPLE)
0065 
0066 
0067 add_executable(ktrash5)
0068 ecm_mark_nongui_executable(ktrash5)
0069 
0070 target_sources(ktrash5 PRIVATE
0071     ktrash.cpp
0072 )
0073 
0074 target_compile_definitions(ktrash5 PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}")
0075 
0076 target_link_libraries(ktrash5
0077   KF5::KIOCore
0078   KF5::I18n
0079   KF5::ConfigCore
0080 )
0081 
0082 install(TARGETS ktrash5 ${KF_INSTALL_TARGETS_DEFAULT_ARGS})
0083 
0084 ########### next target ###############
0085 
0086 # currently not on win32, TODO!
0087 if(NOT WIN32 AND NOT KIOCORE_ONLY)
0088     add_library(kcm_trash MODULE)
0089     kcoreaddons_desktop_to_json(kcm_trash kcmtrash.desktop)
0090     target_sources(kcm_trash PRIVATE
0091         kcmtrash.cpp
0092     )
0093     target_link_libraries(kcm_trash
0094        trash_common_unix
0095        Qt${QT_MAJOR_VERSION}::DBus
0096        KF5::I18n
0097        KF5::ConfigWidgets
0098        KF5::KIOCore
0099        KF5::Solid)
0100     if(APPLE)
0101         target_link_libraries(kcm_trash "-framework DiskArbitration -framework CoreFoundation")
0102     endif(APPLE)
0103 
0104     install(TARGETS kcm_trash DESTINATION ${KDE_INSTALL_PLUGINDIR})
0105 endif()
0106 
0107 ########### install files ###############
0108 
0109 install( FILES kcmtrash.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR} )
0110 
0111 if(NOT KF6_COMPAT_BUILD)
0112     install( FILES kcm_trash.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
0113 endif()