~ps-jenkins/compiz/latestsnapshot-10.9.10+13.10.20131011-0ubuntu1

« back to all changes in this revision

Viewing changes to tests/xorg-gtest/CMakeLists.txt

  • Committer: Sam Spilsbury
  • Date: 2013-02-12 04:30:52 UTC
  • mto: This revision was merged to the branch mainline in revision 3612.
  • Revision ID: sam.spilsbury@canonical.com-20130212043052-mvpzzf6e2vxzvo00
Clean up the Find Google Test and Xorg GTest logic, put them in their own cmake files
behind their own functions. Make it so that all users can see xorg-gtest and not just the users
in tests/

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
set (COMPIZ_LD_LIBRARY_PATH ${CMAKE_BINARY_DIR}/src CACHE STRING "" FORCE)
 
2
set (COMPIZ_BINARY ${CMAKE_BINARY_DIR}/src/compiz CACHE STRING "" FORCE)
 
3
 
 
4
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/src/compiz-xorg-gtest-config.h.in
 
5
                ${CMAKE_CURRENT_BINARY_DIR}/src/compiz-xorg-gtest-config.h
 
6
                @ONLY)
 
7
 
 
8
include_directories (${XORG_SERVER_INCLUDE_XORG_GTEST}
 
9
                     ${XORG_SERVER_GTEST_INCLUDES}
 
10
                     ${COMPIZ_XORG_SYSTEM_TEST_INCLUDE_DIR}
 
11
                     ${CMAKE_CURRENT_BINARY_DIR}/src)
 
12
 
 
13
link_directories (${XORG_SERVER_LIBRARY_DIRS})
 
14
 
 
15
add_definitions (${XORG_SERVER_GTEST_CFLAGS})
 
16
 
 
17
set (_xorg_gtest_all_srcs
 
18
     ${XORG_SERVER_GTEST_SRC}/src/xorg-gtest-all.cpp)
 
19
 
 
20
set (_xorg_gtest_main_srcs
 
21
     ${XORG_SERVER_GTEST_SRC}/src/xorg-gtest_main.cpp)
 
22
 
 
23
add_library (xorg_gtest_all STATIC
 
24
             ${_xorg_gtest_all_srcs})
 
25
 
 
26
add_library (xorg_gtest_main STATIC
 
27
             ${_xorg_gtest_main_srcs})
 
28
 
 
29
add_library (compiz_xorg_gtest_system_test STATIC
 
30
             ${CMAKE_CURRENT_SOURCE_DIR}/src/compiz-xorg-gtest.cpp)
 
31
 
 
32
target_link_libraries (xorg_gtest_all
 
33
                       ${GTEST_BOTH_LIBRARIES}
 
34
                       ${CMAKE_THREAD_LIBS_INIT}
 
35
                       ${XORG_SERVER_GTEST_LIBRARIES})
 
36
 
 
37
target_link_libraries (xorg_gtest_main
 
38
                       ${GTEST_BOTH_LIBRARIES}
 
39
                       ${CMAKE_THREAD_LIBS_INIT}
 
40
                       ${XORG_SERVER_GTEST_LIBRARIES})
 
41
 
 
42
target_link_libraries (compiz_xorg_gtest_system_test
 
43
                       xorg_gtest_all
 
44
                       xorg_gtest_main
 
45
                       ${GTEST_BOTH_LIBRARIES}
 
46
                       ${CMAKE_THREAD_LIBS_INIT}
 
47
                       ${XORG_SERVER_LIBRARIES}
 
48
                       ${X11_XI_LIBRARIES})