summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
blob: 5781cf75b1a0aa40628d92be686f42e2538966a2 (plain)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
############################################
#                                          #
#  Improvements and feedbacks are welcome  #
#                                          #
#  This file is released under GPL >= 3    #
#                                          #
############################################


# required stuff
find_package( TQt )
find_package( TDE )

tde_setup_architecture_flags( )

include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)

tde_setup_largefiles( )


##### check for gcc visibility support

if( WITH_GCC_VISIBILITY )
  tde_setup_gcc_visibility( )
endif( WITH_GCC_VISIBILITY )


##### check for X11

find_package( X11 )


##### check for dvb header

if( WITH_DVB )
    check_include_file( "linux/dvb/frontend.h" HAVE_DVB )
    if( NOT HAVE_DVB )
        tde_message_fatal( "dvb support has been requested but no dvb headers were found on your system." )
    endif()
    set( KAFFEINE_DVB_LIBRARY kaffeinedvb-static )
endif()


##### check for libcdio vs cdparanoia

pkg_search_module( CDIO_CDDA libcdio_cdda )
pkg_search_module( CDIO_PARANOIA libcdio_paranoia )

check_include_file( "cdio/paranoia/cdda.h" HAVE_LIBCDIO_090 )
check_include_file( "cdio/cdda.h"          HAVE_CDPARANOIA  )
if( (NOT HAVE_LIBCDIO_090) AND (NOT HAVE_CDPARANOIA) )
    tde_message_fatal( "libcdio >= 0.90 or cdparanoia are required but were not found on your system." )
endif()


##### check for xinelib

pkg_search_module( XINE libxine )
if( XINE_FOUND )
    set( HAVE_XINE 1 )
    if( ${XINE_VERSION} VERSION_GREATER "1.1.0" )
        set( XINE_PARAM_GAPLESS_SWITCH 1 )
        set( XINE_PARAM_EARLY_FINISHED_EVENT 1 )
    endif()
  else()
    tde_message_fatal( "Xine support has been requested but libxine was not found on your system." )
endif()


##### check for xinerama

if( WITH_XINERAMA )
if( X11_Xinerama_FOUND )
    set( HAVE_XINERAMA 1)
 else()
    tde_message_fatal( "Xinerama support has been requested but was not found on your system." )
endif()
endif( WITH_XINERAMA )


##### check for xcb

if( WITH_XCB )
pkg_search_module( XCB xcb )

if( XCB_FOUND )
    set( HAVE_XCB 1 )
 else()
    tde_message_fatal( "Xcb support has been requested but was not found on your system." )
endif()
endif( WITH_XCB )


##### check for dpms(X11)

if( WITH_DPMS )
if( X11_dpms_FOUND )
    set( HAVE_DPMS 1 )
 else()
    tde_message_fatal( "Dpms support has been requested but was not found on your system." )
endif()
endif( WITH_DPMS )


##### check for XTest

if( WITH_XTEST )
if( X11_XTest_FOUND )
    set( HAVE_XTEST 1 )
 else()
    tde_message_fatal( "XTest support has been requested but was not found on your system." )
endif()
endif( WITH_XTEST )


##### check for gstreamer

if( WITH_GSTREAMER )
pkg_search_module( GST gstreamer-1.0>=1.0.0 gstreamer-0.10>=0.10.0 )
if( NOT GST_FOUND )
    tde_message_fatal( "gstreamer support has been requested but neither gstreamer-1.0 or gstreamer-0.10 were found on your system." )
endif()

if( ${GST_VERSION} GREATER "0.11.0" )
    pkg_search_module( GSTREAMER_VIDEO gstreamer-video-1.0 )
    pkg_search_module( GSTREAMER_PLUGIN gstreamer-plugins-base-1.0 )
else()
    pkg_search_module( GSTREAMER_VIDEO gstreamer-interfaces-0.10 )
    pkg_search_module( GSTREAMER_PLUGIN gstreamer-plugins-base-0.10 )
endif()

message( STATUS "gstreamer version: ${GST_VERSION}" )
message( STATUS "gstreamer video version: ${GSTREAMER_VIDEO_VERSION}" )
message( STATUS "gstreamer plugins version: ${GSTREAMER_PLUGIN_VERSION}" )
endif( WITH_GSTREAMER )


##### check for lame

if( WITH_LAME )
find_path( LAME_INCLUDE_DIR "lame/lame.h" )
find_library( LAME_LIBRARIES mp3lame )
message( STATUS "Found Lame includes directory: ${LAME_INCLUDE_DIR}" )
    
if( NOT LAME_INCLUDE_DIR OR NOT LAME_LIBRARIES )
    tde_message_fatal( "Lame support has been requested but lame was not found on your system." )
endif()
endif( WITH_LAME )


##### check for ogg and vorbis

if( WITH_OGGVORBIS )
pkg_search_module( OGG ogg )
pkg_search_module( VORBIS vorbis )
pkg_search_module( VORBISENC vorbisenc )

if( (NOT VORBISENC_FOUND) OR (NOT OGG_FOUND) )
    tde_message_fatal( "oggvorbis support has been requested but neither ogg or vorbis were not found on your system" )
endif()
endif( WITH_OGGVORBIS )


##### tqt support only

if( USE_TQT_ONLY )
    set( USE_TQT_ONLY 1 )
endif()


##### xinit workaround

if( WITH_XINIT_WORKAROUND )
    set( XINIT_WKRND 1 )
endif()