~mterry/unity8/sim-unlock-on-boot

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=3)
pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=3)

include_directories(
    ${CMAKE_CURRENT_BINARY_DIR}
    ${CMAKE_SOURCE_DIR}/plugins/AccountsService
    ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher
    ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/backend
    ${GSETTINGS_QT_INCLUDE_DIRS}
    )

add_definitions(-DSM_BUSNAME=sessionBus)
add_definitions(-DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
add_definitions(-DLAUNCHER_TESTING)

### LauncherBackendTest
set(testBackendCommand dbus-test-runner --task ${CMAKE_CURRENT_BINARY_DIR}/launcherbackendtestExec
      --parameter -o --parameter ${CMAKE_BINARY_DIR}/launcherbackendtest.xml,xunitxml
      --parameter -o --parameter -,txt)
add_test(NAME launcherbackendtest COMMAND ${testBackendCommand})
add_custom_target(launcherbackendtest ${testBackendCommand})
add_executable(launcherbackendtestExec
    launcherbackendtest.cpp
    ${CMAKE_SOURCE_DIR}/plugins/AccountsService/AccountsServiceDBusAdaptor.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/backend/launcherbackend.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/common/quicklistentry.cpp
    )
target_link_libraries(launcherbackendtestExec ${GSETTINGS_QT_LDFLAGS})
qt5_use_modules(launcherbackendtestExec Test Core DBus)

### LauncherModelTest
set(testModelCommand ${CMAKE_CURRENT_BINARY_DIR}/launchermodeltestExec
      -o ${CMAKE_BINARY_DIR}/launchermodeltest.xml,xunitxml
      -o -,txt)
add_test(NAME launchermodeltest COMMAND ${testModelCommand})
add_custom_target(launchermodeltest ${testModelCommand})
add_executable(launchermodeltestExec
    launchermodeltest.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/launchermodel.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/launcheritem.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/quicklistmodel.cpp
    ${CMAKE_SOURCE_DIR}/plugins/AccountsService/AccountsServiceDBusAdaptor.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/backend/launcherbackend.cpp
    ${CMAKE_SOURCE_DIR}/plugins/Unity/Launcher/common/quicklistentry.cpp
    ${LAUNCHER_API_INCLUDEDIR}/unity/shell/launcher/LauncherItemInterface.h
    ${LAUNCHER_API_INCLUDEDIR}/unity/shell/launcher/LauncherModelInterface.h
    ${LAUNCHER_API_INCLUDEDIR}/unity/shell/launcher/QuickListModelInterface.h
    ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/ApplicationManagerInterface.h
    ${LAUNCHER_API_INCLUDEDIR}/unity/shell/application/ApplicationInfoInterface.h
    )
target_link_libraries(launchermodeltestExec ${GSETTINGS_QT_LDFLAGS})
qt5_use_modules(launchermodeltestExec Test Core DBus)

# copy .desktop files into build directory for shadow builds
file(GLOB DESKTOP_FILES *.desktop)

foreach(DESKTOP_FILE ${DESKTOP_FILES})
    file(COPY "${DESKTOP_FILE}"
        DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
        )
endforeach()

# copy .svg files into build directory for shadow builds
file(GLOB DESKTOP_FILES *.svg)

foreach(DESKTOP_FILE ${DESKTOP_FILES})
    file(COPY "${DESKTOP_FILE}"
        DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
        )
endforeach()