diff options
| author | Elvis Angelaccio <[email protected]> | 2017-05-21 21:41:13 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2017-05-27 10:23:47 +0200 |
| commit | 4216c7e6bade899bcc5636acb0529fdcadf0956c (patch) | |
| tree | f4682e3c1a57607a6f976f8d6ef574e315d3ada3 /src/CMakeLists.txt | |
| parent | 4d9c396a9877ff459703c6372b5426860a32400b (diff) | |
Move non-exported code to a static library
This allows us to speed up the compilation because we don't need to
build twice the source files we use in the unit tests.
Test Plan: Builds, dolphin works and tests pass.
Reviewers: emmanuelp, dfaure
Differential Revision: https://phabricator.kde.org/D5935
Diffstat (limited to 'src/CMakeLists.txt')
| -rw-r--r-- | src/CMakeLists.txt | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ce4cec80c..bc6f75d62 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -193,7 +193,7 @@ install(FILES dolphinpart.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) ########################################## -set(dolphin_SRCS +set(dolphinstatic_SRCS dolphindockwidget.cpp dolphinmainwindow.cpp dolphinviewcontainer.cpp @@ -248,11 +248,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 @@ -265,36 +264,44 @@ 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() -# 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}) +add_library(dolphinstatic STATIC ${dolphinstatic_SRCS}) -target_include_directories(kdeinit_dolphin PRIVATE ${PHONON_INCLUDES}) - -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( |
