-
Notifications
You must be signed in to change notification settings - Fork 6
/
ConfigureChecks.cmake
117 lines (103 loc) · 4.83 KB
/
ConfigureChecks.cmake
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
# Checking Headers and Functions for fontconfig
include( CheckIncludeFile )
include( CheckFunctionExists )
include( CheckTypeSize)
if(WIN32)
if(MSVC)
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH} ${CMAKE_INCLUDE_PATH}/msvc )
else(MSVC)
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH} ${CMAKE_INCLUDE_PATH}/mingw )
endif(MSVC)
endif(WIN32)
if(Linux)
set(_POSIX_SOURCE 1)
set(_GNU_SOURCE 1)
endif()
if(Solaris)
set(_POSIX_PTHREAD_SEMANTICS 1)
set(__EXTENSIONS__ 1)
endif()
set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${FREETYPE_LIBRARIES} ${EXPAT_LIBRARIES} )
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${FREETYPE_INCLUDE_DIR} ${EXPAT_INCLUDE_DIR} )
check_include_file( "dirent.h" HAVE_DIRENT_H )
check_include_file( "dlfcn.h" HAVE_DLFCN_H )
check_include_file( "fcntl.h" HAVE_FCNTL_H )
check_include_file( "inttypes.h" HAVE_INTTYPES_H )
check_include_file( "memory.h" HAVE_MEMORY_H )
check_include_file( "ndir.h" HAVE_NDIR_H )
check_include_file( "regex.h" HAVE_REGEX_H )
check_include_file( "sched.h" HAVE_SCHED_H )
check_include_file( "stdint.h" HAVE_STDINT_H )
check_include_file( "stdlib.h" HAVE_STDLIB_H )
check_include_file( "strings.h" HAVE_STRINGS_H )
check_include_file( "string.h" HAVE_STRING_H )
check_include_file( "sys/dir.h" HAVE_SYS_DIR_H )
check_include_file( "sys/mount.h" HAVE_SYS_MOUNT_H )
check_include_file( "sys/ndir.h" HAVE_SYS_NDIR_H )
check_include_file( "sys/param.h" HAVE_SYS_PARAM_H )
check_include_file( "sys/statfs.h" HAVE_SYS_STATFS_H )
check_include_file( "sys/stat.h" HAVE_SYS_STAT_H )
check_include_file( "sys/types.h" HAVE_SYS_TYPES_H )
check_include_file( "sys/vfs.h" HAVE_SYS_VFS_H )
check_include_file( "unistd.h" HAVE_UNISTD_H )
check_include_file( "xmlparse.h" HAVE_XMLPARSE_H )
check_function_exists( chsize HAVE_CHSIZE )
check_function_exists( _doprnt HAVE_DOPRNT )
check_function_exists( _mktemp_s HAVE__MKTEMP_S )
check_function_exists( fstatfs HAVE_FSTATFS )
check_function_exists( fstatvfs HAVE_FSTATVFS )
check_function_exists( ftruncate HAVE_FTRUNCATE )
check_function_exists( FT_Get_BDF_Property HAVE_FT_GET_BDF_PROPERTY )
check_function_exists( FT_Get_Next_Char HAVE_FT_GET_NEXT_CHAR )
check_function_exists( FT_Get_PS_Font_Info HAVE_FT_GET_PS_FONT_INFO )
check_function_exists( FT_Get_X11_Font_Format HAVE_FT_GET_X11_FONT_FORMAT )
check_function_exists( FT_Has_PS_Glyph_Names HAVE_FT_HAS_PS_GLYPH_NAMES )
check_function_exists( FT_Select_Size HAVE_FT_SELECT_SIZE )
check_function_exists( getexecname HAVE_GETEXECNAME )
check_function_exists( geteuid HAVE_GETEUID )
check_function_exists( getopt HAVE_GETOPT )
check_function_exists( getopt_long HAVE_GETOPT_LONG )
check_function_exists( getpagesize HAVE_GETPAGESIZE )
check_function_exists( getprogname HAVE_GETPROGNAME )
check_function_exists( getuid HAVE_GETUID )
check_function_exists( link HAVE_LINK )
check_function_exists( lrand48 HAVE_LRAND48 )
check_function_exists( lstat HAVE_LSTAT )
check_function_exists( memmove HAVE_MEMMOVE )
check_function_exists( memset HAVE_MEMSET )
check_function_exists( mkdtemp HAVE_MKDTEMP )
check_function_exists( mkostemp HAVE_MKOSTEMP )
check_function_exists( mkstemp HAVE_MKSTEMP )
check_function_exists( mmap HAVE_MMAP )
check_function_exists( posix_fadivse HAVE_POSIX_FADVISE )
check_function_exists( rand HAVE_RAND )
check_function_exists( rand_r HAVE_RAND_R )
check_function_exists( random HAVE_RANDOM )
check_function_exists( random_r HAVE_RANDOM_R )
check_function_exists( readlink HAVE_READLINK )
check_function_exists( regcomp HAVE_REGCOMP )
check_function_exists( regerror HAVE_REGERROR )
check_function_exists( regexec HAVE_REGEXEC )
check_function_exists( regfree HAVE_REGFREE )
check_function_exists( scandir HAVE_SCANDIR )
check_function_exists( strchr HAVE_STRCHR )
check_function_exists( strrchr HAVE_STRRCHR )
check_function_exists( strtol HAVE_STRTOL )
check_function_exists( sysconf HAVE_SYSCONF )
check_function_exists( vprintf HAVE_VPRINTF )
check_function_exists( XML_SetDoctypeDeclHandler HAVE_XML_SETDOCTYPEDECLHANDLER )
CHECK_TYPE_SIZE("char" SIZEOF_CHAR BUILTIN_TYPES_ONLY)
CHECK_TYPE_SIZE("int" SIZEOF_INT BUILTIN_TYPES_ONLY)
CHECK_TYPE_SIZE("long" SIZEOF_LONG BUILTIN_TYPES_ONLY)
CHECK_TYPE_SIZE("short" SIZEOF_SHORT BUILTIN_TYPES_ONLY)
CHECK_TYPE_SIZE("void*" SIZEOF_VOIDP BUILTIN_TYPES_ONLY)
CHECK_TYPE_SIZE("void *" SIZEOF_VOID_P BUILTIN_TYPES_ONLY)
add_definitions( -DHAVE_CONFIG_H)
add_definitions( -DFONTCONFIG_PATH="\\"${CMAKE_INSTALL_PREFIX}/etc/fonts\\"" )
set( FC_DEFAULT_FONTS "%WINDIR%\\fonts" )
set( FC_CACHEDIR "\"%TEMP%\\fc_cache\"" )
set( ALIGNOF_DOUBLE 8)
set( HAVE_INTEL_ATOMIC_PRIMITIVES 1)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/fonts.conf.cmake ${CMAKE_CURRENT_BINARY_DIR}/fonts.conf )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/fonts.conf DESTINATION etc/fonts )