CMakeLists.txt 1.25 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
include_directories(${Qt5Core_PRIVATE_INCLUDE_DIRS})
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})

set(QPA_SOURCES
    abstractplatformcontext.cpp
    backingstore.cpp
    integration.cpp
    main.cpp
    nativeinterface.cpp
    platformcontextwayland.cpp
11
    platformcursor.cpp
12 13 14 15 16
    screen.cpp
    sharingplatformcontext.cpp
    window.cpp
)

17 18 19
include(ECMQtDeclareLoggingCategory)
ecm_qt_declare_logging_category(QPA_SOURCES HEADER logging.h IDENTIFIER KWIN_QPA CATEGORY_NAME kwin_qpa_plugin DEFAULT_SEVERITY Critical)

20
add_library(KWinQpaPlugin MODULE ${QPA_SOURCES})
21 22 23 24 25 26 27 28 29 30 31 32

if(Qt5Core_VERSION VERSION_LESS "5.8.0")
    add_definitions(-DQ_FONTCONFIGDATABASE)
    set(QT5PLATFORMSUPPORT_LIBS Qt5PlatformSupport::Qt5PlatformSupport)
else()
    set(QT5PLATFORMSUPPORT_LIBS
        Qt5FontDatabaseSupport::Qt5FontDatabaseSupport
        Qt5ThemeSupport::Qt5ThemeSupport
        Qt5EventDispatcherSupport::Qt5EventDispatcherSupport
)
endif()

33 34 35
target_link_libraries(KWinQpaPlugin
    kwin
    KF5::WaylandClient
36
    ${QT5PLATFORMSUPPORT_LIBS}
37 38 39 40
    ${FONTCONFIG_LIBRARIES}
    ${FREETYPE_LIBRARIES}
)

41 42 43 44
if(HAVE_WAYLAND_EGL)
    target_link_libraries(KWinQpaPlugin Wayland::Egl)
endif()

45 46 47 48 49 50
install(
    TARGETS
        KWinQpaPlugin
    DESTINATION
        ${PLUGIN_INSTALL_DIR}/platforms/
)