CMakeLists.txt 3.09 KB
Newer Older
Halla Rempt's avatar
Halla Rempt committed
1
add_subdirectory(tests)
2

3
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/config)
Halla Rempt's avatar
Halla Rempt committed
4 5 6
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/xmlgui)

configure_file(xmlgui/config-xmlgui.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-xmlgui.h )
7

8
set(kritawidgetutils_LIB_SRCS
9

10
    kis_icon_utils.cpp
Michael Abrahams's avatar
Michael Abrahams committed
11
    kis_action_registry.cpp
12
    KoGroupButton.cpp
13 14 15 16
    KoProgressBar.cpp
    KoProgressUpdater.cpp
    KoUpdater.cpp
    KoUpdaterPrivate_p.cpp
Halla Rempt's avatar
Halla Rempt committed
17
    KoProperties.cpp
18
    KoFileDialog.cpp
Michael Abrahams's avatar
Michael Abrahams committed
19
    KoResourcePaths.cpp
20

21 22 23 24
    config/kcolorscheme.cpp
    config/kcolorschememanager.cpp
    config/khelpclient.cpp
    config/klanguagebutton.cpp
25 26 27
    config/krecentfilesaction.cpp
    config/kstandardaction.cpp

28 29 30 31 32
    xmlgui/KisShortcutsEditorItem.cpp
    xmlgui/KisShortcutEditWidget.cpp
    xmlgui/KisShortcutsEditorDelegate.cpp
    xmlgui/KisShortcutsDialog.cpp
    xmlgui/KisShortcutsDialog_p.cpp
33
    xmlgui/KisShortcutsEditor.cpp
34
    xmlgui/KisShortcutsEditor_p.cpp
35 36 37

    # xmlgui/kshortcutschemeseditor.cpp
    # xmlgui/kshortcutschemeshelper.cpp
38

Halla Rempt's avatar
Halla Rempt committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
    xmlgui/kaboutkdedialog_p.cpp
    xmlgui/kactioncategory.cpp
    xmlgui/kactioncollection.cpp
    xmlgui/kactionconflictdetector.cpp
    xmlgui/kbugreport.cpp
    xmlgui/kcheckaccelerators.cpp
    xmlgui/kedittoolbar.cpp
    xmlgui/kgesture.cpp
    xmlgui/kgesturemap.cpp
    xmlgui/khelpmenu.cpp
    xmlgui/kkeysequencewidget.cpp
    xmlgui/kmainwindow.cpp
    xmlgui/kmenumenuhandler_p.cpp
    xmlgui/kshortcutwidget.cpp
    xmlgui/kswitchlanguagedialog_p.cpp
    xmlgui/ktoggletoolbaraction.cpp
    xmlgui/ktoolbar.cpp
    xmlgui/ktoolbarhandler.cpp
    xmlgui/kundoactions.cpp
    xmlgui/kxmlguibuilder.cpp
    xmlgui/kxmlguiclient.cpp
    xmlgui/kxmlguifactory.cpp
    xmlgui/kxmlguifactory_p.cpp
    xmlgui/kxmlguiversionhandler.cpp
    xmlgui/kxmlguiwindow.cpp
)

if (HAVE_DBUS)
    set(kritawidgetutils_LIB_SRCS ${kritawidgetutils_LIB_SRCS}
        xmlgui/kmainwindowiface.cpp
    )
endif()

72 73
ki18n_wrap_ui(kritawidgetutils_LIB_SRCS
    xmlgui/KisShortcutsDialog.ui
Halla Rempt's avatar
Halla Rempt committed
74
    xmlgui/kshortcutwidget.ui
75
)
76

Michael Abrahams's avatar
Michael Abrahams committed
77
qt5_add_resources(kritawidgetutils_LIB_SRCS xmlgui/kxmlgui.qrc)
Halla Rempt's avatar
Halla Rempt committed
78

79
include_directories(${KRITAGLOBAL_INCLUDES})
Halla Rempt's avatar
Halla Rempt committed
80

81 82
add_library(kritawidgetutils SHARED ${kritawidgetutils_LIB_SRCS})
generate_export_header(kritawidgetutils BASE_NAME kritawidgetutils)
83

Halla Rempt's avatar
Halla Rempt committed
84 85 86 87
if (HAVE_DBUS)
   set (KRITA_WIDGET_UTILS_EXTRA_LIBS ${KRITA_WIDGET_UTILS_EXTRA_LIBS} Qt5::DBus)
endif ()

88 89 90 91 92
if (APPLE)
    find_library(FOUNDATION_LIBRARY Foundation)
    set(KRITA_WIDGET_UTILS_EXTRA_LIBS ${KRITA_WIDGET_UTILS_EXTRA_LIBS} ${FOUNDATION_LIBRARY})
endif ()

93
target_link_libraries(kritawidgetutils
94 95 96 97 98
    PUBLIC
        Qt5::Widgets
        Qt5::Gui
        Qt5::Xml
        Qt5::Core
99
        KF5::ItemViews
100
        kritaglobal
101
    PRIVATE
Halla Rempt's avatar
Halla Rempt committed
102
        Qt5::PrintSupport
103 104
        KF5::I18n
        KF5::ConfigCore
Halla Rempt's avatar
Halla Rempt committed
105
        KF5::CoreAddons
106 107 108
        KF5::ConfigGui
        KF5::GuiAddons
        KF5::WidgetsAddons
Halla Rempt's avatar
Halla Rempt committed
109 110
        KF5::WindowSystem
        ${KRITA_WIDGET_UTILS_EXTRA_LIBS}
111
)
112

113
set_target_properties(kritawidgetutils
114 115 116
    PROPERTIES VERSION ${GENERIC_CALLIGRA_LIB_VERSION} SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION}
)

117
install(TARGETS kritawidgetutils ${INSTALL_TARGETS_DEFAULT_ARGS})