summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
blob: 5a14d7ff61fcca53cb9bcb59998656e8c2dfe34b (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
###########################################
#                                         #
#  Improvements and feedback 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 ALSA #####

if( BUILD_ALSA_PLUGIN )
  find_package( ALSA )
  if( NOT ALSA_FOUND )
    tde_message_fatal( "alsa support is requested, but was not found on your system" )
  endif( NOT ALSA_FOUND )
endif( BUILD_ALSA_PLUGIN )


###### check for LAME #####

if( WITH_LAME )
  check_include_file( lame/lame.h HAVE_LAME_H )
  if( NOT HAVE_LAME_H )
    tde_message_fatal( "lame is requested, but not found on your system" )
  endif( )
  check_library_exists( mp3lame lame_init "" HAVE_LAME )
  if( NOT HAVE_LAME )
    tde_message_fatal( "mp3lame is requested, but not found on your system" )
  endif( )
  set( HAVE_LAME 1 )
  set( LAME_LIBRARIES mp3lame CACHE INTERNAL "" FORCE )
endif( WITH_LAME )


##### check for LIRC #####

if( BUILD_LIRC_PLUGIN )
  pkg_search_module( LIRC lirc )
  if( NOT LIRC_FOUND )
    tde_message_fatal( "lirc support is requested, but was not found on your system" )
  endif( NOT LIRC_FOUND )
endif( BUILD_LIRC_PLUGIN )


##### check for OGG/Vorbis #####

if( WITH_OGG )
  pkg_search_module( VORBIS     vorbis     )
  pkg_search_module( VORBISFILE vorbisfile )
  pkg_search_module( VORBISENC  vorbisenc  )
  pkg_search_module( OGG        ogg        )
  if( NOT VORBIS_FOUND )
    tde_message_fatal( "vorbis is requested, but was not found on your system" )
  elseif( NOT VORBISFILE_FOUND OR NOT VORBISENC_FOUND OR NOT OGG_FOUND )
    tde_message_fatal( "vorbis is requested, but some of it's essential parts wasn't found on your system" )
  endif( )
  set( HAVE_OGG 1 )
endif( WITH_OGG )


##### check for sndfile #####

pkg_search_module( SNDFILE sndfile )
if( NOT SNDFILE_FOUND )
  tde_message_fatal( "sndfile is required, but was not found on your system" )
endif( )


##### Check for videodev #####

check_include_file( "linux/videodev2.h" HAVE_VIDEODEV2_H )
if( HAVE_VIDEODEV2_H )
  set( HAVE_V4L2 1 )
endif( )