summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
blob: 3a9bbd2097553523bb462a69883c0c699275fa08 (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
###########################################
#                                         #
#  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 )


##### libdvdread

pkg_search_module ( LIBDVDREAD dvdread REQUIRED )
if ( NOT LIBDVDREAD_FOUND )
  tde_message_fatal( "libdvdread is required, but was not found on your system" )
endif ( )


##### ffmpeg

pkg_search_module( LIBAVCODEC libavcodec )
if( NOT LIBAVCODEC_FOUND )
  tde_message_fatal( "libavcodec is required, but was not found on your system" )
endif( )

pkg_search_module( LIBAVFORMAT libavformat )
if( NOT LIBAVFORMAT_FOUND )
  tde_message_fatal( "libavformat is required, but was not found on your system" )
endif( )

pkg_search_module( LIBAVUTIL libavutil )
if( NOT LIBAVUTIL_FOUND )
  tde_message_fatal( "libavutil is required, but was not found on your system" )
endif( )

pkg_search_module( LIBSWSCALE libswscale )
if( NOT LIBSWSCALE_FOUND )
  tde_message_fatal( "libswscale is required, but was not found on your system" )
endif( )

##### k3bdevice library
find_library( HAVE_K3BDEVICE k3bdevice )
if( HAVE_K3BDEVICE )
  set( K3BDEVICE_LIBRARY "k3bdevice" )
else()
  tde_message_fatal( "libk3bdevice is required, but was not found on your system" )
endif( )


##### OpenGL

if( WITH_OPENGL )
  set( OpenGL_GL_PREFERENCE LEGACY )
  find_package( OpenGL )
  if( NOT OPENGL_FOUND )
    tde_message_fatal( "OpenGL is required, but was not found on your system" )
  endif( NOT OPENGL_FOUND )
  set( HAVE_OPENGL ${OPENGL_FOUND} )
endif( WITH_OPENGL )


##### types

check_include_file( "inttypes.h" HAVE_INTTYPES_H )
check_include_file( "stdint.h" HAVE_STDINT_H )


##### architecture

if( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i686" )
  set( ARCH_X86 1 )
elseif( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
  set( ARCH_X86_64 1 )
elseif( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "alpha" )
  set( ARCH_ALPHA 1 )
elseif( ${CMAKE_SYSTEM_PROCESSOR} MATCHES ppc* )
  set( ARCH_PPC 1 )
elseif( ${CMAKE_SYSTEM_PROCESSOR} MATCHES sparc* )
  set( ARCH_SPARC 1 )
endif()