~paulliu/ubuntu/quantal/freerdp/fixext

« back to all changes in this revision

Viewing changes to client/X11/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2012-01-31 10:02:14 UTC
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: package-import@ubuntu.com-20120131100214-zvig71djj2sqgq22
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# FreeRDP: A Remote Desktop Protocol Client
 
2
# FreeRDP X11 Client
 
3
#
 
4
# Copyright 2011 O.S. Systems Software Ltda.
 
5
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
 
6
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
 
7
#
 
8
# Licensed under the Apache License, Version 2.0 (the "License");
 
9
# you may not use this file except in compliance with the License.
 
10
# You may obtain a copy of the License at
 
11
#
 
12
#     http://www.apache.org/licenses/LICENSE-2.0
 
13
#
 
14
# Unless required by applicable law or agreed to in writing, software
 
15
# distributed under the License is distributed on an "AS IS" BASIS,
 
16
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
17
# See the License for the specific language governing permissions and
 
18
# limitations under the License.
 
19
 
 
20
include(FindXmlto)
 
21
include_directories(${X11_INCLUDE_DIRS})
 
22
 
 
23
add_executable(xfreerdp
 
24
        xf_gdi.c
 
25
        xf_gdi.h
 
26
        xf_rail.c
 
27
        xf_rail.h
 
28
        xf_tsmf.c
 
29
        xf_tsmf.h
 
30
        xf_event.c
 
31
        xf_event.h
 
32
        xf_cliprdr.c
 
33
        xf_cliprdr.h
 
34
        xf_monitor.c
 
35
        xf_monitor.h
 
36
        xf_graphics.c
 
37
        xf_graphics.h
 
38
        xf_keyboard.c
 
39
        xf_keyboard.h
 
40
        xf_window.c
 
41
        xf_window.h
 
42
        xfreerdp.c
 
43
        xfreerdp.h)
 
44
 
 
45
if(WITH_MANPAGES)
 
46
        if(XMLTO_FOUND)
 
47
                add_custom_command(OUTPUT xfreerdp.1
 
48
                        COMMAND ${XMLTO_EXECUTABLE} man ${CMAKE_CURRENT_SOURCE_DIR}/xfreerdp.1.xml
 
49
                        DEPENDS xfreerdp.1.xml)
 
50
 
 
51
                add_custom_target(xfreerdp.manpage ALL
 
52
                        DEPENDS xfreerdp.1)
 
53
 
 
54
                install(FILES ${CMAKE_CURRENT_BINARY_DIR}/xfreerdp.1 DESTINATION share/man/man1)
 
55
        else(XMLTO_FOUND)
 
56
                message(WARNING "WITH_MANPAGES was set, but xmlto was not found. man-pages will not be installed")
 
57
        endif(XMLTO_FOUND)
 
58
endif(WITH_MANPAGES)
 
59
 
 
60
find_suggested_package(Xinerama)
 
61
if(XINERAMA_FOUND)
 
62
        add_definitions(-DWITH_XINERAMA -DWITH_XEXT)
 
63
        include_directories(${XINERAMA_INCLUDE_DIRS})
 
64
        target_link_libraries(xfreerdp ${XINERAMA_LIBRARIES})
 
65
endif()
 
66
 
 
67
find_suggested_package(Xext)
 
68
if(XEXT_FOUND)
 
69
        add_definitions(-DWITH_XEXT)
 
70
        include_directories(${XEXT_INCLUDE_DIRS})
 
71
        target_link_libraries(xfreerdp ${XEXT_LIBRARIES})
 
72
endif()
 
73
 
 
74
find_suggested_package(Xcursor)
 
75
if(XCURSOR_FOUND)
 
76
        add_definitions(-DWITH_XCURSOR)
 
77
        include_directories(${XCURSOR_INCLUDE_DIRS})
 
78
        target_link_libraries(xfreerdp ${XCURSOR_LIBRARIES})
 
79
endif()
 
80
 
 
81
find_suggested_package(Xv)
 
82
if(XV_FOUND)
 
83
        add_definitions(-DWITH_XV)
 
84
        include_directories(${XV_INCLUDE_DIRS})
 
85
        target_link_libraries(xfreerdp ${XV_LIBRARIES})
 
86
endif()
 
87
 
 
88
include_directories(${CMAKE_SOURCE_DIR}/resources)
 
89
 
 
90
target_link_libraries(xfreerdp freerdp-core)
 
91
target_link_libraries(xfreerdp freerdp-gdi)
 
92
target_link_libraries(xfreerdp freerdp-kbd)
 
93
target_link_libraries(xfreerdp freerdp-rail)
 
94
target_link_libraries(xfreerdp freerdp-channels)
 
95
target_link_libraries(xfreerdp freerdp-utils)
 
96
target_link_libraries(xfreerdp ${X11_LIBRARIES} ${CMAKE_DL_LIBS})
 
97
 
 
98
install(TARGETS xfreerdp DESTINATION ${CMAKE_INSTALL_BINDIR})