CONFIG += module
MODULE_PRI += $$PWD/../../modules/qt_compositor.pri

INCLUDEPATH += $$PWD
DEFINES += QT_WAYLAND_WINDOWMANAGER_SUPPORT
DEFINES += QT_BUILD_COMPOSITOR_LIB

!mac:use_pkgconfig {
    CONFIG += link_pkgconfig
    PKGCONFIG += wayland-server

    #set the rpath
    !isEmpty(QMAKE_LFLAGS_RPATH) {
        WAYLAND_NEEDS_RPATH = $$system(pkg-config --libs-only-L wayland-server)
        !isEmpty(WAYLAND_NEEDS_RPATH) {
            WAYLAND_LIBDIR = $$system(pkg-config --variable=libdir wayland-server)
            !isEmpty(WAYLAND_LIBDIR):QMAKE_LFLAGS += $${QMAKE_LFLAGS_RPATH}$${WAYLAND_LIBDIR}
        }
    }
} else {
    INCLUDEPATH += $$QMAKE_INCDIR_WAYLAND
    !isEmpty(QMAKE_LIBDIR_WAYLAND) {
        LIBS += -L$$QMAKE_LIBDIR_WAYLAND
    }
    LIBS += -lwayland-server -lffi
}

HEADERS += qtcompositorversion.h

include ($$PWD/global/global.pri)
include ($$PWD/wayland_wrapper/wayland_wrapper.pri)
include ($$PWD/hardware_integration/hardware_integration.pri)
include ($$PWD/compositor_api/compositor_api.pri)
include ($$PWD/windowmanagerprotocol/windowmanagerprotocol.pri)

CONFIG += module

load(qt_module)
MODULE_PRI += $$PWD/../../modules/qt_compositor.pri

INCLUDEPATH += $$PWD
DEFINES += QT_WAYLAND_WINDOWMANAGER_SUPPORT
DEFINES += QT_BUILD_COMPOSITOR_LIB

!mac:use_pkgconfig {
    CONFIG += link_pkgconfig
    PKGCONFIG += wayland-server

    #set the rpath
    !isEmpty(QMAKE_LFLAGS_RPATH) {
        WAYLAND_NEEDS_RPATH = $$system(pkg-config --libs-only-L wayland-server)
        !isEmpty(WAYLAND_NEEDS_RPATH) {
            WAYLAND_LIBDIR = $$system(pkg-config --variable=libdir wayland-server)
            !isEmpty(WAYLAND_LIBDIR):QMAKE_LFLAGS += $${QMAKE_LFLAGS_RPATH}$${WAYLAND_LIBDIR}
        }
    }
} else {
    INCLUDEPATH += $$QMAKE_INCDIR_WAYLAND
    !isEmpty(QMAKE_LIBDIR_WAYLAND) {
        LIBS += -L$$QMAKE_LIBDIR_WAYLAND
    }
    LIBS += -lwayland-server -lffi
}

HEADERS += qtcompositorversion.h

include ($$PWD/global/global.pri)
include ($$PWD/wayland_wrapper/wayland_wrapper.pri)
include ($$PWD/hardware_integration/hardware_integration.pri)
include ($$PWD/compositor_api/compositor_api.pri)
include ($$PWD/windowmanagerprotocol/windowmanagerprotocol.pri)

Load the module so we get the correct QT_CONFIG
Load the module so we get the correct QT_CONFIG

We need this to autodetect if we'r going to build WaylandSurfaceItem

Change-Id: Icdd5379d8334422ff4f780bf5192e9c01101e9db
Reviewed-by: Samuel Rødal <99126055f8d73e4355b075213322026fa8c060bd@nokia.com>
