1
# This is a copy of the normal LightDM plugin, but instead of statically
2
# linking in the lightdm bits, this one uses shared libraries so we can swap
3
# out different sets of users for different tests. When we finally switch to
4
# actually using the system liblightdm in the normal plugin, this version can
1
8
add_subdirectory(full)
2
9
add_subdirectory(single)
3
10
add_subdirectory(single-pin)
4
11
add_subdirectory(single-passphrase)
14
${CMAKE_CURRENT_SOURCE_DIR}
15
${CMAKE_CURRENT_BINARY_DIR}
16
${CMAKE_SOURCE_DIR}/plugins/Utils
17
${CMAKE_SOURCE_DIR}/tests/mocks/libusermetrics
21
${CMAKE_SOURCE_DIR}/plugins/LightDM/DBusGreeterList.cpp
22
${CMAKE_SOURCE_DIR}/plugins/LightDM/Greeter.cpp
23
${CMAKE_SOURCE_DIR}/plugins/LightDM/plugin.cpp
24
${CMAKE_SOURCE_DIR}/plugins/LightDM/UsersModel.cpp
25
${CMAKE_SOURCE_DIR}/plugins/Utils/qsortfilterproxymodelqml.cpp
28
add_library(MockLightDM-qml MODULE
32
# We want to link to liblightdm-qt5-2, but we don't want to depend on it being
33
# installed on the system. So we make sure we link to our full fake version
34
# At run time, we can point to whichever version we happen to be using via
36
add_dependencies(MockLightDM-qml MockLightDM-full MockUserMetrics)
37
target_link_libraries(MockLightDM-qml
38
-L${CMAKE_CURRENT_BINARY_DIR}/full
40
-L${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics
44
qt5_use_modules(MockLightDM-qml DBus Gui Qml)
46
add_unity8_mock(LightDM 0.1 LightDM
48
TARGETS MockLightDM-qml
49
ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/full"