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