]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/CMakeLists.txt
Open externally called files/directories in new tabs
[dolphin.git] / src / CMakeLists.txt
index ce4cec80c5417af3084c9611e0638083325250ee..8a025e584369bbcc12b24e00414bc16ebf56f92c 100644 (file)
@@ -2,16 +2,15 @@ include(ECMAddAppIcon)
 
 configure_file(config-baloo.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-baloo.h)
 
-configure_file(config-dolphin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-dolphin.h)
+configure_file(config-kactivities.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kactivities.h)
+
+configure_file(config-terminal.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-terminal.h)
 
 add_definitions(
     -DTRANSLATION_DOMAIN=\"dolphin\"
-    -DQT_USE_FAST_CONCATENATION
-    -DQT_USE_FAST_OPERATOR_PLUS
 )
 remove_definitions(
     -DQT_NO_CAST_FROM_BYTEARRAY
-    -DQT_NO_URL_CAST_FROM_STRING
     -DQT_NO_SIGNALS_SLOTS_KEYWORDS
     -DQT_NO_CAST_FROM_ASCII
     -DQT_NO_CAST_TO_ASCII
@@ -89,7 +88,6 @@ set(dolphinprivate_LIB_SRCS
     kitemviews/private/kitemlistviewanimation.cpp
     kitemviews/private/kitemlistviewlayouter.cpp
     kitemviews/private/kpixmapmodifier.cpp
-    settings/additionalinfodialog.cpp
     settings/applyviewpropsjob.cpp
     settings/viewmodes/viewmodesettings.cpp
     settings/viewpropertiesdialog.cpp
@@ -102,21 +100,23 @@ set(dolphinprivate_LIB_SRCS
     views/dolphinviewactionhandler.cpp
     views/draganddrophelper.cpp
     views/renamedialog.cpp
-    views/tooltips/dolphinfilemetadatawidget.cpp
-    views/tooltips/tooltipmanager.cpp
     views/versioncontrol/updateitemstatesthread.cpp
     views/versioncontrol/versioncontrolobserver.cpp
     views/viewmodecontroller.cpp
     views/viewproperties.cpp
     views/zoomlevelinfo.cpp
     dolphinremoveaction.cpp
+    middleclickactioneventfilter.cpp
     dolphinnewfilemenu.cpp
-    dolphindebug.cpp
 )
 
+ecm_qt_declare_logging_category(dolphinprivate_LIB_SRCS HEADER dolphindebug.h IDENTIFIER DolphinDebug CATEGORY_NAME org.kde.dolphin)
+
 if(HAVE_BALOO)
     set(dolphinprivate_LIB_SRCS
         ${dolphinprivate_LIB_SRCS}
+        views/tooltips/dolphinfilemetadatawidget.cpp
+        views/tooltips/tooltipmanager.cpp
         kitemviews/private/kbaloorolesprovider.cpp
     )
 endif()
@@ -136,8 +136,8 @@ 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
@@ -148,6 +148,7 @@ target_link_libraries(
     KF5::ConfigCore
     KF5::NewStuff
     KF5::Parts
+    KF5::WindowSystem
 )
 
 if(HAVE_BALOO)
@@ -157,11 +158,6 @@ if(HAVE_BALOO)
         KF5::Baloo
         KF5::BalooWidgets
     )
-else()
-    target_link_libraries(
-        dolphinprivate PUBLIC
-        KF5::KDELibs4Support # for KFileMetaDataWidget
-    )
 endif()
 
 set_target_properties(dolphinprivate PROPERTIES
@@ -180,6 +176,8 @@ set(dolphinpart_SRCS
    dolphindebug.cpp
 )
 
+qt5_add_resources(dolphinpart_SRCS dolphinpart.qrc)
+
 add_library(dolphinpart MODULE ${dolphinpart_SRCS})
 
 target_link_libraries(dolphinpart
@@ -188,30 +186,25 @@ 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
+    dolphinbookmarkhandler.cpp
     dolphindockwidget.cpp
     dolphinmainwindow.cpp
     dolphinviewcontainer.cpp
     dolphincontextmenu.cpp
     dolphintabbar.cpp
+    dolphinplacesmodelsingleton.cpp
     dolphinrecenttabsmenu.cpp
     dolphintabpage.cpp
     dolphintabwidget.cpp
+    trash/dolphintrash.cpp
     filterbar/filterbar.cpp
-    main.cpp
-    panels/information/filemetadataconfigurationdialog.cpp
-    panels/information/informationpanel.cpp
-    panels/information/informationpanelcontent.cpp
-    panels/information/pixmapviewer.cpp
-    panels/information/phononwidget.cpp
     panels/places/placespanel.cpp
     panels/places/placesitem.cpp
-    panels/places/placesitemeditdialog.cpp
     panels/places/placesitemlistgroupheader.cpp
     panels/places/placesitemlistwidget.cpp
     panels/places/placesitemmodel.cpp
@@ -221,6 +214,7 @@ set(dolphin_SRCS
     panels/folders/foldersitemlistwidget.cpp
     panels/folders/treeviewcontextmenu.cpp
     panels/folders/folderspanel.cpp
+    panels/terminal/terminalpanel.cpp
     search/dolphinfacetswidget.cpp
     search/dolphinsearchbox.cpp
     settings/general/behaviorsettingspage.cpp
@@ -248,11 +242,20 @@ set(dolphin_SRCS
     statusbar/statusbarspaceinfo.cpp
     views/zoomlevelinfo.cpp
     dolphindebug.cpp
-    dbusinterface.cpp
     global.cpp
 )
 
-kconfig_add_kcfg_files(dolphin_SRCS GENERATE_MOC
+if(HAVE_BALOO)
+    set(dolphinstatic_SRCS
+        ${dolphinstatic_SRCS}
+        panels/information/informationpanel.cpp
+        panels/information/informationpanelcontent.cpp
+        panels/information/pixmapviewer.cpp
+        panels/information/phononwidget.cpp
+    )
+endif()
+
+kconfig_add_kcfg_files(dolphinstatic_SRCS GENERATE_MOC
     panels/folders/dolphin_folderspanelsettings.kcfgc
     panels/information/dolphin_informationpanelsettings.kcfgc
     panels/places/dolphin_placespanelsettings.kcfgc
@@ -264,37 +267,44 @@ kconfig_add_kcfg_files(dolphin_SRCS GENERATE_MOC
     settings/dolphin_versioncontrolsettings.kcfgc
 )
 
-if(NOT WIN32)
-   set(dolphin_SRCS ${dolphin_SRCS} panels/terminal/terminalpanel.cpp)
-endif()
-
-# 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})
+qt5_add_resources(dolphinstatic_SRCS dolphin.qrc)
 
-target_include_directories(kdeinit_dolphin PRIVATE ${PHONON_INCLUDES})
+add_library(dolphinstatic STATIC ${dolphinstatic_SRCS})
 
-target_link_libraries(kdeinit_dolphin
+target_include_directories(dolphinstatic SYSTEM 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)
+if (HAVE_KACTIVITIES)
     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 PRIVATE
+    dolphinstatic
+    dolphinprivate
+    KF5::Crash
+)
+
 include(DbusInterfaceMacros)
 
 generate_and_install_dbus_interface(
@@ -375,6 +385,13 @@ install(TARGETS kcm_dolphingeneral DESTINATION ${KDE_INSTALL_PLUGINDIR} )
 ########### install files ###############
 
 install( PROGRAMS org.kde.dolphin.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
+
+install( DIRECTORY DESTINATION "${KDE_INSTALL_FULL_DATAROOTDIR}/kglobalaccel" )
+
+install(
+    CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"${KDE_INSTALL_FULL_APPDIR}/org.kde.dolphin.desktop\" \"\$ENV{DESTDIR}${KDE_INSTALL_FULL_DATAROOTDIR}/kglobalaccel/org.kde.dolphin.desktop\")"
+)
+
 install( FILES settings/dolphin_directoryviewpropertysettings.kcfg
                settings/dolphin_generalsettings.kcfg
                settings/dolphin_compactmodesettings.kcfg
@@ -382,10 +399,8 @@ 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 org.kde.dolphin.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
-install( FILES settings/kcm/kcmdolphinviewmodes.desktop DESTINATION
-${KDE_INSTALL_KSERVICES5DIR} )
+install( FILES settings/kcm/kcmdolphinviewmodes.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
 install( FILES settings/kcm/kcmdolphinnavigation.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
 install( FILES settings/kcm/kcmdolphinservices.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
 install( FILES settings/kcm/kcmdolphingeneral.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )