X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/d4fafe529026d23f900c11f28f31e197bb6dc96c..20d57ab48875a4a8cff440254dc379e4bc1393bc:/src/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e0f91deed..9a8302ff1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,4 @@ +include(ECMAddAppIcon) configure_file(config-baloo.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-baloo.h) @@ -23,8 +24,7 @@ set(dolphinvcs_LIB_SRCS ) add_library(dolphinvcs ${dolphinvcs_LIB_SRCS}) - -generate_export_header(dolphinvcs BASE_NAME dolphin) +generate_export_header(dolphinvcs BASE_NAME dolphinvcs) target_link_libraries( dolphinvcs PUBLIC @@ -48,7 +48,7 @@ ecm_generate_headers(dolphinvcs_LIB_HEADERS install(TARGETS dolphinvcs EXPORT DolphinVcsTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES views/versioncontrol/fileviewversioncontrolplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dolphin_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR} COMPONENT Devel) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dolphinvcs_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR} COMPONENT Devel) install(FILES ${dolphinvcs_LIB_HEADERS} DESTINATION "${KDE_INSTALL_INCLUDEDIR}/Dolphin" COMPONENT Devel) ########### next target ############### @@ -102,7 +102,7 @@ set(dolphinprivate_LIB_SRCS views/dolphinviewactionhandler.cpp views/draganddrophelper.cpp views/renamedialog.cpp - views/tooltips/filemetadatatooltip.cpp + views/tooltips/dolphinfilemetadatawidget.cpp views/tooltips/tooltipmanager.cpp views/versioncontrol/updateitemstatesthread.cpp views/versioncontrol/versioncontrolobserver.cpp @@ -110,6 +110,7 @@ set(dolphinprivate_LIB_SRCS views/viewproperties.cpp views/zoomlevelinfo.cpp dolphinremoveaction.cpp + middleclickactioneventfilter.cpp dolphinnewfilemenu.cpp dolphindebug.cpp ) @@ -131,11 +132,14 @@ kconfig_add_kcfg_files(dolphinprivate_LIB_SRCS GENERATE_MOC ) add_library(dolphinprivate ${dolphinprivate_LIB_SRCS}) +generate_export_header(dolphinprivate BASE_NAME dolphin) target_link_libraries( dolphinprivate PUBLIC dolphinvcs + Qt5::Concurrent Qt5::Gui + KF5::Crash KF5::I18n KF5::IconThemes KF5::KIOCore @@ -143,7 +147,6 @@ target_link_libraries( KF5::KIOFileWidgets KF5::Completion KF5::TextWidgets - KF5::WindowSystem KF5::ConfigCore KF5::NewStuff KF5::Parts @@ -169,6 +172,7 @@ set_target_properties(dolphinprivate PROPERTIES ) install(TARGETS dolphinprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dolphin_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR} COMPONENT Devel) ########################################## @@ -178,6 +182,8 @@ set(dolphinpart_SRCS dolphindebug.cpp ) +qt5_add_resources(dolphinpart_SRCS dolphinpart.qrc) + add_library(dolphinpart MODULE ${dolphinpart_SRCS}) target_link_libraries(dolphinpart @@ -186,12 +192,11 @@ target_link_libraries(dolphinpart install(TARGETS dolphinpart DESTINATION ${KDE_INSTALL_PLUGINDIR}) -install(FILES dolphinpart.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/dolphinpart) install(FILES dolphinpart.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) ########################################## -set(dolphin_SRCS +set(dolphinstatic_SRCS dolphindockwidget.cpp dolphinmainwindow.cpp dolphinviewcontainer.cpp @@ -246,11 +251,10 @@ set(dolphin_SRCS statusbar/statusbarspaceinfo.cpp views/zoomlevelinfo.cpp dolphindebug.cpp - dbusinterface.cpp global.cpp ) -kconfig_add_kcfg_files(dolphin_SRCS GENERATE_MOC +kconfig_add_kcfg_files(dolphinstatic_SRCS GENERATE_MOC panels/folders/dolphin_folderspanelsettings.kcfgc panels/information/dolphin_informationpanelsettings.kcfgc panels/places/dolphin_placespanelsettings.kcfgc @@ -263,35 +267,46 @@ kconfig_add_kcfg_files(dolphin_SRCS GENERATE_MOC ) if(NOT WIN32) - set(dolphin_SRCS ${dolphin_SRCS} panels/terminal/terminalpanel.cpp) + set(dolphinstatic_SRCS ${dolphinstatic_SRCS} panels/terminal/terminalpanel.cpp) endif() -# TODO Does anything replace kde4_add_app_icon ? -#kde4_add_app_icon(dolphin_SRCS "${KDE4_ICON_INSTALL_DIR}/oxygen/*/apps/system-file-manager.png") +qt5_add_resources(dolphinstatic_SRCS dolphin.qrc) -kf5_add_kdeinit_executable(dolphin ${dolphin_SRCS}) - -target_include_directories(kdeinit_dolphin PRIVATE ${PHONON_INCLUDES}) +add_library(dolphinstatic STATIC ${dolphinstatic_SRCS}) -target_link_libraries(kdeinit_dolphin +target_include_directories(dolphinstatic PRIVATE ${PHONON_INCLUDES}) +target_link_libraries(dolphinstatic dolphinprivate - KF5::Parts KF5::KCMUtils - KF5::Solid - KF5::CoreAddons KF5::DBusAddons - KF5::Bookmarks KF5::Notifications Phonon::phonon4qt5 ) if (KF5Activities_FOUND) target_link_libraries( - kdeinit_dolphin + dolphinstatic KF5::Activities ) endif() +set(dolphin_SRCS + dbusinterface.cpp + main.cpp +) + +# Sets the icon on Windows and OSX +file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*system-file-manager.png") +ecm_add_app_icon(dolphin_SRCS ICONS ${ICONS_SRCS}) + +kf5_add_kdeinit_executable(dolphin ${dolphin_SRCS}) + + +target_link_libraries(kdeinit_dolphin + dolphinstatic + dolphinprivate +) + include(DbusInterfaceMacros) generate_and_install_dbus_interface( @@ -379,8 +394,7 @@ install( FILES settings/dolphin_directoryviewpropertysettings.kcfg settings/dolphin_detailsmodesettings.kcfg settings/dolphin_versioncontrolsettings.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR} ) -install( FILES dolphinui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/dolphin ) -install( FILES dolphin.appdata.xml DESTINATION ${KDE_INSTALL_DATAROOTDIR}/appdata ) +install( FILES org.kde.dolphin.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} ) install( FILES settings/kcm/kcmdolphinviewmodes.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) install( FILES settings/kcm/kcmdolphinnavigation.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )