blob: 254eb03d4a5059a238bab6ec81c5b6398db31b67 (
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
|
#################################################
#
# (C) 2017 Slávek Banko
# slavek (DOT) banko (AT) axis.cz
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
if( NOT ATTRIBUTE_ALIGNED_MAX )
foreach( ATTRIBUTE_ALIGNED_TEST 2 4 8 16 32 64 )
check_c_source_compiles(
"int main() { static char c __attribute__ ((aligned(${ATTRIBUTE_ALIGNED_TEST}))) = 0; return c; }"
ATTRIBUTE_ALIGNED_MAX_${ATTRIBUTE_ALIGNED_TEST}
)
if( ATTRIBUTE_ALIGNED_MAX_${ATTRIBUTE_ALIGNED_TEST} )
set( ATTRIBUTE_ALIGNED_MAX ${ATTRIBUTE_ALIGNED_TEST} CACHE INTERNAL "" FORCE )
else( )
break( )
endif( )
endforeach( )
endif( NOT ATTRIBUTE_ALIGNED_MAX )
check_function_exists( strlcpy HAVE_STRLCPY )
check_symbol_exists( strlcpy "string.h" HAVE_STRLCPY_PROTO )
tde_save_and_set( CMAKE_REQUIRED_FLAGS "-include X11/Xlib.h" )
pkg_search_module( XEXT xext )
check_include_file( "X11/extensions/XShm.h" X11_SHARED_MEM )
check_include_file( "X11/extensions/xf86dga1.h" X11_DGA2 )
if( X11_DGA2 )
set( DGA_LIBRARIES Xxf86dga )
endif( )
check_include_file( "X11/extensions/Xvlib.h" X11_XV )
if( X11_XV )
set( XV_LIBRARIES Xv )
endif( )
check_include_file( "X11/extensions/xf86vmode.h" X11_XVIDMODE )
if( X11_XVIDMODE )
set( XVIDMODE_LIBRARIES Xxf86vm )
endif( )
tde_restore( CMAKE_REQUIRED_FLAGS )
|