on bb09f86 help sign in
67 lines 2.5 kB history raw
1pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
3include_directories(
4 ${CMAKE_CURRENT_SOURCE_DIR}
5 ${CMAKE_CURRENT_BINARY_DIR}
6 ${CMAKE_SOURCE_DIR}/plugins/AccountsService
7 ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher
8 ${libunity8-private_SOURCE_DIR}
9 )
11include_directories(
12 SYSTEM
13 ${GSETTINGS_QT_INCLUDE_DIRS}
14 ${GLIB_INCLUDE_DIRS}
15 ${UAL_INCLUDE_DIRS}
16 )
18add_definitions(-DSM_BUSNAME=sessionBus)
19add_definitions(-DTEST_DIR="plugins/Unity/Launcher")
21### LauncherModelTest
22add_executable(launchermodeltestExec
23 launchermodeltest.cpp
24 gsettings.cpp
25 ${CMAKE_SOURCE_DIR}/plugins/AccountsService/AccountsServiceDBusAdaptor.cpp
26 ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/launchermodel.cpp
27 ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/asadapter.cpp
28 ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/launcheritem.cpp
29 ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/quicklistmodel.cpp
30 ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/dbusinterface.cpp
31 ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/quicklistentry.cpp
32 ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/ualwrapper.cpp
33 ${LAUNCHER_API_INCLUDEDIR}/unity/shell/launcher/LauncherItemInterface.h
34 ${LAUNCHER_API_INCLUDEDIR}/unity/shell/launcher/LauncherModelInterface.h
35 ${LAUNCHER_API_INCLUDEDIR}/unity/shell/launcher/QuickListModelInterface.h
36 ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/ApplicationManagerInterface.h
37 ${LAUNCHER_API_INCLUDEDIR}/unity/shell/application/ApplicationInfoInterface.h
38 )
39target_link_libraries(launchermodeltestExec
40 unity8-private
41 ${GSETTINGS_QT_LDFLAGS}
42 ${GLIB_LIBRARIES}
43 ${UAL_LIBRARIES}
44 )
45add_dependencies(launchermodeltestExec mock-server)
46qt5_use_modules(launchermodeltestExec Test Core DBus Xml Gui Qml)
47install(TARGETS launchermodeltestExec
48 DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/plugins/Unity/Launcher"
49 )
51add_unity8_unittest(LauncherModel dbus-test-runner
52 ENVIRONMENT "APPDIR=${CMAKE_CURRENT_BINARY_DIR}/applications"
53 ARG_PREFIX "--parameter"
54 ARGS
55 --task $<TARGET_FILE:mock-server>
56 --ignore-return
57 --task $<TARGET_FILE:launchermodeltestExec>
58 --wait-for org.freedesktop.Accounts
61# copy sample application files into build directory for shadow builds
62file(COPY applications
63 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
64 )
65install(DIRECTORY applications
66 DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/plugins/Unity/Launcher"
67 )