~ci-train-bot/unity8/unity8-ubuntu-zesty-2167

« back to all changes in this revision

Viewing changes to tests/mocks/LightDM/CMakeLists.txt

  • Committer: Michał Sawicz
  • Date: 2013-06-05 22:03:08 UTC
  • Revision ID: michal.sawicz@canonical.com-20130605220308-yny8fv3futtr04fg
Inital unity8 commit.

Previous history can be found at https://code.launchpad.net/~unity-team/unity/phablet

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
5
# be deleted.
 
6
 
 
7
add_subdirectory(demo)
 
8
add_subdirectory(full)
 
9
add_subdirectory(single)
 
10
 
 
11
include_directories(
 
12
    ${CMAKE_CURRENT_SOURCE_DIR}
 
13
    ${CMAKE_CURRENT_BINARY_DIR}
 
14
)
 
15
 
 
16
set(QMLPLUGIN_SRC
 
17
    ${CMAKE_SOURCE_DIR}/plugins/LightDM/Greeter.cpp
 
18
    ${CMAKE_SOURCE_DIR}/plugins/LightDM/plugin.cpp
 
19
    ${CMAKE_SOURCE_DIR}/plugins/LightDM/UsersModel.cpp
 
20
    ${CMAKE_SOURCE_DIR}/plugins/Utils/qsortfilterproxymodelqml.cpp
 
21
    )
 
22
 
 
23
add_library(MockLightDM-qml MODULE
 
24
    ${QMLPLUGIN_SRC}
 
25
    )
 
26
 
 
27
# We want to link to liblightdm-qt5-2, but we don't want to depend on it being
 
28
# installed on the system.  So we make sure we link to our full fake version
 
29
# At run time, we can point to whichever version we happen to be using via
 
30
# LD_LIBRARY_PATH.
 
31
add_dependencies(MockLightDM-qml MockLightDM-full)
 
32
target_link_libraries(MockLightDM-qml
 
33
    -L${CMAKE_CURRENT_BINARY_DIR}/full
 
34
    -llightdm-qt5-2
 
35
    )
 
36
 
 
37
qt5_use_modules(MockLightDM-qml Gui Qml)
 
38
 
 
39
# copy qmldir file into build directory for shadow builds
 
40
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
 
41
    DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
 
42
    )
 
43
 
 
44
install(TARGETS MockLightDM-qml
 
45
    DESTINATION ${SHELL_APP_DIR}/plugins/mocks/LightDM
 
46
    )
 
47
 
 
48
install(FILES qmldir
 
49
    DESTINATION ${SHELL_APP_DIR}/plugins/mocks/LightDM
 
50
    )