CMakeLists.txt 4.03 KB
Newer Older
1
if(BUILD_TESTING)
2
    # only with this definition will the KONQ_TESTS_EXPORT macro do something
David Faure's avatar
David Faure committed
3
    add_definitions(-DBUILD_TESTING)
4
endif(BUILD_TESTING)
5

6
add_subdirectory( tests )
7

8 9
add_definitions(-DTRANSLATION_DOMAIN=\"konqueror\")

10 11 12
if (KActivities_FOUND)
  include_directories(${KACTIVITIES_INCLUDE_DIRS})
endif (KActivities_FOUND)
Ralf Habacker's avatar
Ralf Habacker committed
13

14
########### libkonquerorprivate, shared with unit tests and sidebar modules ###############
15 16

set(konquerorprivate_SRCS
17 18 19 20 21
   konqhistorymanager.cpp # for unit tests
   konqpixmapprovider.cpp # needed ?!?

   # for the sidebar history module
   konqhistorymodel.cpp
22
   ksortfilterproxymodel.cpp
23 24 25
   konqhistoryproxymodel.cpp
   konqhistoryview.cpp
   konqhistorysettings.cpp
26
)
Laurent Montel's avatar
Laurent Montel committed
27

28 29
add_library(konquerorprivate SHARED ${konquerorprivate_SRCS})
target_link_libraries(konquerorprivate
30
   KF5::IconThemes
31 32
   KF5::Konq
   KF5::Parts
33
   KF5::KIOGui
34
)
35 36 37 38 39 40

if(X11_FOUND)
  target_link_libraries(konquerorprivate Qt5::X11Extras)
endif(X11_FOUND)


41
set_target_properties(konquerorprivate PROPERTIES VERSION ${KONQUEROR_LIB_VERSION} SOVERSION "5" )
Laurent Montel's avatar
Laurent Montel committed
42
install(TARGETS konquerorprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
43

44
include(GenerateExportHeader)
Andrius da Costa Ribas's avatar
Andrius da Costa Ribas committed
45 46
generate_export_header(konquerorprivate BASE_NAME konquerorprivate EXPORT_FILE_NAME konquerorprivate_export.h)

47
########### konqueror ###############
48

49
set(konqueror_KDEINIT_SRCS
50 51 52 53 54
   konqapplication.cpp
   konqguiclients.cpp
   konqrun.cpp
   konqview.cpp
   konqviewmanager.cpp
55
   konqmouseeventfilter.cpp
56
   konqmisc.cpp
57
   konqdraggablelabel.cpp
58
   konqframe.cpp
59
   konqframevisitor.cpp
60 61 62 63
   konqframestatusbar.cpp
   konqframecontainer.cpp
   konqtabs.cpp
   konqactions.cpp
64
   konqsessiondlg.cpp
65 66 67 68
   konqfactory.cpp
   konqcombo.cpp
   konqbrowseriface.cpp
   delayedinitializer.cpp
69
   konqanimatedlogo.cpp
70
   konqmainwindow.cpp
71
   konqmainwindowfactory.cpp
72
   konqextensionmanager.cpp
73
   konqbookmarkbar.cpp
74
   konqsettings.cpp
75 76 77
   KonquerorAdaptor.cpp
   KonqMainWindowAdaptor.cpp
   KonqViewAdaptor.cpp
78
   konqundomanager.cpp
79
   konqclosedwindowsmanager.cpp
80
   konqsessionmanager.cpp
81
   konqcloseditem.cpp
Pino Toscano's avatar
Pino Toscano committed
82
   konqhistorydialog.cpp
David Faure's avatar
David Faure committed
83
   konqstatusbarmessagelabel.cpp
84
)
85

86
kconfig_add_kcfg_files(konqueror_KDEINIT_SRCS konqsettingsxt.kcfgc)
David Faure's avatar
David Faure committed
87 88
ki18n_wrap_ui(konqueror_KDEINIT_SRCS konqsessiondlg_base.ui)
ki18n_wrap_ui(konqueror_KDEINIT_SRCS konqnewsessiondlg_base.ui)
89

90 91 92 93 94
qt5_add_dbus_interface(konqueror_KDEINIT_SRCS org.kde.Konqueror.Main.xml konqueror_interface)
qt5_add_dbus_adaptor(konqueror_KDEINIT_SRCS org.kde.Konqueror.UndoManager.xml konqclosedwindowsmanager.h KonqClosedWindowsManager konqclosedwindowsmanageradaptor KonqClosedWindowsManagerAdaptor)
qt5_add_dbus_interface(konqueror_KDEINIT_SRCS org.kde.Konqueror.UndoManager.xml konqclosedwindowsmanager_interface)
qt5_add_dbus_adaptor(konqueror_KDEINIT_SRCS org.kde.Konqueror.SessionManager.xml konqsessionmanager.h KonqSessionManager konqsessionmanageradaptor KonqSessionManagerAdaptor)
qt5_add_dbus_interface(konqueror_KDEINIT_SRCS org.kde.Konqueror.SessionManager.xml konqsessionmanager_interface)
95

96 97
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../pics/*-apps-konqueror.png")
ecm_add_app_icon(konqueror_KDEINIT_SRCS ICONS ${ICONS_SRCS})
98
kf5_add_kdeinit_executable(konqueror ${konqueror_KDEINIT_SRCS} konqmain.cpp)
99 100 101 102 103 104
target_link_libraries(kdeinit_konqueror
   konquerorprivate
   KF5::Archive
   KF5::KCMUtils
   KF5::Konq
   KF5::Parts
105
   KF5::DBusAddons
106
   KF5::KDELibs4Support
107
   KF5::Crash
108
)
109

110
if (X11_FOUND)
Dirk Mueller's avatar
Dirk Mueller committed
111
  target_link_libraries(kdeinit_konqueror ${X11_LIBRARIES})
112
endif ()
Dirk Mueller's avatar
Dirk Mueller committed
113

114 115 116
if (KActivities_FOUND)
  target_link_libraries(kdeinit_konqueror ${KACTIVITIES_LIBRARY})
endif (KActivities_FOUND)
Ralf Habacker's avatar
Ralf Habacker committed
117

118
if (NOT WIN32)
Laurent Montel's avatar
Laurent Montel committed
119
    install(TARGETS kdeinit_konqueror  ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
120
endif (NOT WIN32)
Laurent Montel's avatar
Laurent Montel committed
121
install(TARGETS konqueror ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
122 123

########### install files ###############
Laurent Montel's avatar
Laurent Montel committed
124 125 126
install( FILES konqueror.kcfg  DESTINATION  ${KDE_INSTALL_KCFGDIR} )
install( FILES konqueror.rc DESTINATION  ${KDE_INSTALL_KXMLGUI5DIR}/konqueror )
install( FILES org.kde.Konqueror.Main.xml org.kde.Konqueror.MainWindow.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR} )