include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_CURRENT_BINARY_DIR}
    ${CMAKE_SOURCE_DIR}/plugins/Utils
)

include_directories(
    SYSTEM
    ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
    ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
    ${GIO_INCLUDE_DIRS}
)

set(QMLPLUGIN_SRC
    ${CMAKE_SOURCE_DIR}/plugins/Utils/activefocuslogger.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/qlimitproxymodelqml.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/lomirisortfilterproxymodelqml.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/lomirimenumodelpaths.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/windowinputfilter.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/easingcurve.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/inputwatcher.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/timezoneFormatter.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/applicationsfiltermodel.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/inputeventgenerator.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/deviceconfig.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/globalfunctions.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/appdrawerproxymodel.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/tabfocusfence.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/expressionfiltermodel.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Utils/quicklistproxymodel.cpp
    ${APPLICATION_API_INCLUDEDIR}/lomiri/shell/application/ApplicationManagerInterface.h
    ${APPLICATION_API_INCLUDEDIR}/lomiri/shell/application/ApplicationInfoInterface.h
    ${APPLICATION_API_INCLUDEDIR}/lomiri/shell/application/MirSurfaceInterface.h
    ${APPLICATION_API_INCLUDEDIR}/lomiri/shell/application/MirSurfaceListInterface.h
    ${APPLICATION_API_INCLUDEDIR}/lomiri/shell/application/Mir.h
    ${LAUNCHER_API_INCLUDEDIR}/lomiri/shell/launcher/AppDrawerModelInterface.h
    ${LAUNCHER_API_INCLUDEDIR}/lomiri/shell/launcher/LauncherModelInterface.h
    ${LAUNCHER_API_INCLUDEDIR}/lomiri/shell/launcher/LauncherItemInterface.h
    ${LAUNCHER_API_INCLUDEDIR}/lomiri/shell/launcher/QuickListModelInterface.h
    constants.cpp
    plugin.cpp
    windowstatestorage.cpp
    URLDispatcher.cpp
    deviceinfo.cpp
    )

add_library(FakeUtils-qml SHARED
    ${QMLPLUGIN_SRC}
    )

target_link_libraries(FakeUtils-qml
    ${GIO_LDFLAGS}
    Qt5::Qml Qt5::Quick Qt5::DBus Qt5::Network Qt5::Gui
)

# Because this is an internal support library, we want
# to expose all symbols in it. Consider changing this
# either to a static library or just using the
# files directly in targets.
set_target_properties(FakeUtils-qml PROPERTIES COMPILE_FLAGS -fvisibility=default)

add_lomiri_mock(Utils 0.1 Utils TARGETS FakeUtils-qml)
