summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
blob: 00b1c771360e86acbe4951c3e84bc9342e158734 (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
177
178
179
180
181
182
183
184
185
186
187
188
189
############################################
#                                          #
#  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 XShm, Xv

if( X11_FOUND )
    elseif( NOT X11_XShm_FOUND )
            tde_message_fatal( "libXext is required, but was not found on your system." )
    elseif( NOT X11_Xv_FOUND )
            tde_message_fatal( "libXv is required, but was not found on your system." )
endif()


##### check for cairo

if( WITH_CAIRO )
    pkg_search_module( CAIRO cairo )

    if( CAIRO_FOUND )
        set( HAVE_CAIRO 1 )
     else()
        tde_message_fatal( "Cairo support has been requested but cairo was not found on your system." )
    endif()
endif( WITH_CAIRO )


##### check for expat

if( WITH_EXPAT )
    find_package( EXPAT )

    if( EXPAT_FOUND )
        set( HAVE_EXPAT 1 )
     else()
        tde_message_fatal( "Expat support has been requested but expat was not found on your system." )
    endif()
endif( WITH_EXPAT )


##### check for XTest

if( WITH_XTEST )
    pkg_search_module( X11_XTEST xtst )

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


##### check for npplayer

if ( BUILD_KNPPLAYER )
     pkg_search_module( DBUS      dbus-1      )
     pkg_search_module( DBUS-TQT  dbus-tqt    )
     pkg_search_module( NSPR      nspr        )
     pkg_search_module( GTK2      gtk+-2.0    )
     pkg_search_module( GLIB2     glib-2.0    )
     pkg_search_module( GDK2      gdk-x11-2.0 )
     pkg_search_module( GTHREAD   gthread-2.0 )
     pkg_search_module( GMODULE2  gmodule-2.0 )
     pkg_search_module( DBUS-GLIB dbus-glib-1 )

     if( DBUS_FOUND AND DBUS-TQT_FOUND )
         set( HAVE_DBUS 1 )
      else()
         tde_message_fatal( "Dbus is required but dbus was not found on your system." )
     endif()

     if( NSPR_FOUND )
         set( HAVE_NSPR 1 )
      else()
         tde_message_fatal( "Nspr support has been requested but nspr was not found on your system." )
     endif()

     if( NOT GTK2_FOUND )
         tde_message_fatal( "GTK2 support is required but was not found on your system." )
     endif()

     if( NOT GLIB2_FOUND )
         tde_message_fatal( "GLIB2 support is required but was not found on your system." )
     endif()

     if( NOT GDK2_FOUND )
         tde_message_fatal( "GDK2 support is required but was not found on your system." )
     endif()

     if( NOT GTHREAD_FOUND )
         tde_message_fatal( "GTHREAD support is required but was not found on your system." )
     endif()

     if( NOT GMODULE2_FOUND )
         tde_message_fatal( "GMODULE2 support is required but was not found on your system." )
     endif()

     if( NOT DBUS-GLIB_FOUND )
         tde_message_fatal( "DBUS-GLIB support is required but was not found on your system." )
     endif()
endif( BUILD_KNPPLAYER )


##### check for xine-engine

if( BUILD_KXINEPLAYER )
    pkg_search_module( XINE libxine )
    
    if( XINE_FOUND )
        set( HAVE_XINE 1 )
     else()
       tde_message_fatal( "Xine support has been requested but libxine was not found on your system." )
    endif()
endif( BUILD_KXINEPLAYER )


##### check for gstreamer

if( BUILD_KGSTPLAYER )
    pkg_search_module( GSTREAMER gstreamer-1.0>=1.0.0 gstreamer-0.10>=0.10.0 )

    if( GSTREAMER_FOUND )
        set( HAVE_GSTREAMER 1 )
     else()
        tde_message_fatal( "Gstreamer support has been requested but gstreamer was not found on your system." )
    endif()

    if( ${GSTREAMER_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:         ${GSTREAMER_VERSION}"        )
    message( STATUS "gstreamer video version:   ${GSTREAMER_VIDEO_VERSION}"  )
    message( STATUS "gstreamer plugins version: ${GSTREAMER_PLUGIN_VERSION}" )
endif( BUILD_KGSTPLAYER )


##### check for koffice-plugin

if( BUILD_KOFFICE_PLUGIN )

    find_path( KOFFICE_INCLUDE_DIR NAMES KoDocument.h
               HINTS
                   ${TQT_INCLUDE_DIRS}
                   ${TDE_INCLUDE_DIR}
                   ${TDE_INCLUDE_DIR}/tde
    )
    
    if( "${KOFFICE_INCLUDE_DIR}" STREQUAL "KOFFICE_INCLUDE_DIR-NOTFOUND" )
        tde_message_fatal( "KOffice plugin is requested but KOffice headers were not found on your system." )
    endif()
    
    set( HAVE_KOFFICE 1 CACHE INTERNAL "" )
    set( KOFFICE_LIBRARIES kofficecore kofficeui )
endif( BUILD_KOFFICE_PLUGIN )