Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 1 | project('harfbuzz', 'c', 'cpp', |
Mathieu Duponchelle | 07cadc9 | 2018-06-18 17:18:05 +0200 | [diff] [blame] | 2 | meson_version: '>= 0.47.0', |
Ebrahim Byagowi | 31218b4 | 2020-03-11 22:27:32 +0330 | [diff] [blame] | 3 | default_options : ['cpp_std=c++11'], |
Ebrahim Byagowi | f9bc373 | 2020-04-17 22:37:48 +0430 | [diff] [blame] | 4 | version: '2.6.5') |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 5 | |
Ebrahim Byagowi | 466dbaa | 2020-03-24 19:52:43 +0430 | [diff] [blame] | 6 | warning('Meson is not our main build system yet, don\'t use it for packaging HarfBuzz for *nix distros for now') |
| 7 | |
Tim-Philipp Müller | 535186f | 2018-12-03 20:51:06 +0100 | [diff] [blame] | 8 | hb_version_arr = meson.project_version().split('.') |
| 9 | hb_version_major = hb_version_arr[0].to_int() |
| 10 | hb_version_minor = hb_version_arr[1].to_int() |
| 11 | hb_version_micro = hb_version_arr[2].to_int() |
| 12 | |
| 13 | # libtool versioning |
| 14 | hb_version_int = hb_version_major*10000 + hb_version_minor*100 + hb_version_micro |
| 15 | if hb_version_minor % 2 == 1 |
| 16 | hb_libtool_revision = 0 # for unstable releases |
| 17 | else |
| 18 | hb_libtool_revision = hb_version_micro # for stable releases |
| 19 | endif |
| 20 | hb_libtool_age = hb_version_int - hb_libtool_revision |
| 21 | hb_libtool_current = hb_libtool_age |
| 22 | hb_libtool_version_info = '@0@:@1@:@2@'.format(hb_libtool_current, hb_libtool_revision, hb_libtool_age) |
| 23 | |
Mathieu Duponchelle | 484313f | 2018-06-05 02:15:43 +0200 | [diff] [blame] | 24 | pkgmod = import('pkgconfig') |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 25 | cpp = meson.get_compiler('cpp') |
| 26 | |
Tim-Philipp Müller | 4a47f1a | 2018-12-01 11:05:27 +0000 | [diff] [blame] | 27 | if cpp.get_id() == 'msvc' |
| 28 | # Ignore several spurious warnings for things HarfBuzz does very commonly. |
| 29 | # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it |
| 30 | # If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once |
| 31 | # NOTE: Only add warnings here if you are sure they're spurious |
| 32 | msvc_args = [ |
| 33 | '/wd4018', # implicit signed/unsigned conversion |
| 34 | '/wd4146', # unary minus on unsigned (beware INT_MIN) |
| 35 | '/wd4244', # lossy type conversion (e.g. double -> int) |
| 36 | '/wd4305', # truncating type conversion (e.g. double -> float) |
| 37 | cpp.get_supported_arguments(['/utf-8']), # set the input encoding to utf-8 |
| 38 | ] |
Tim-Philipp Müller | bb8aaa3 | 2020-03-14 01:05:38 +0000 | [diff] [blame] | 39 | add_project_arguments(msvc_args, language : ['c', 'cpp']) |
Tim-Philipp Müller | 4a47f1a | 2018-12-01 11:05:27 +0000 | [diff] [blame] | 40 | # Disable SAFESEH with MSVC for libs that use external deps that are built with MinGW |
| 41 | # noseh_link_args = ['/SAFESEH:NO'] |
| 42 | endif |
| 43 | |
Tim-Philipp Müller | bb8aaa3 | 2020-03-14 01:05:38 +0000 | [diff] [blame] | 44 | add_project_arguments(cpp.get_supported_arguments([ |
Ebrahim Byagowi | 365d2d3 | 2020-03-11 20:16:36 +0330 | [diff] [blame] | 45 | '-fno-rtti', |
| 46 | '-fno-exceptions', |
| 47 | '-fno-threadsafe-statics', |
| 48 | '-fvisibility-inlines-hidden', # maybe shouldn't be applied for mingw |
| 49 | ]), language : 'cpp') |
| 50 | |
| 51 | if host_machine.cpu_family() == 'arm' and cpp.alignment('struct { char c; }') != 1 |
| 52 | if cpp.has_argument('-mstructure-size-boundary=8') |
Tim-Philipp Müller | bb8aaa3 | 2020-03-14 01:05:38 +0000 | [diff] [blame] | 53 | add_project_arguments('-mstructure-size-boundary=8', language : 'cpp') |
Ebrahim Byagowi | 365d2d3 | 2020-03-11 20:16:36 +0330 | [diff] [blame] | 54 | endif |
| 55 | endif |
| 56 | |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 57 | python3 = import('python').find_installation('python3') |
| 58 | |
| 59 | check_headers = [ |
| 60 | ['unistd.h'], |
| 61 | ['sys/mman.h'], |
| 62 | ['xlocale.h'], |
| 63 | ['stdbool.h'], |
| 64 | ] |
| 65 | |
| 66 | check_funcs = [ |
| 67 | ['atexit'], |
| 68 | ['mprotect'], |
| 69 | ['sysconf'], |
| 70 | ['getpagesize'], |
| 71 | ['mmap'], |
| 72 | ['isatty'], |
| 73 | ['newlocale'], |
| 74 | ['strtod_l'], |
Ebrahim Byagowi | 1c3f80b | 2020-03-11 19:29:47 +0330 | [diff] [blame] | 75 | ['roundf'], |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 76 | ] |
| 77 | |
Chun-wei Fan | 733414b | 2020-03-13 16:15:21 +0800 | [diff] [blame] | 78 | freetype_dep = dependency('freetype2', required: false) |
| 79 | |
| 80 | if not freetype_dep.found() and cpp.get_id() == 'msvc' |
| 81 | if cpp.has_header('ft2build.h') |
| 82 | freetype_dep = cpp.find_library('freetype', required: false) |
| 83 | endif |
| 84 | endif |
| 85 | |
| 86 | if not freetype_dep.found() and get_option('freetype').enabled() |
| 87 | freetype_dep = dependency('freetype2', fallback: ['freetype2', 'freetype_dep']) |
| 88 | endif |
| 89 | |
Tim-Philipp Müller | 49ba211 | 2018-11-12 15:36:27 +0000 | [diff] [blame] | 90 | glib_dep = dependency('glib-2.0', required: get_option('glib'), |
Nirbheek Chauhan | f65def4 | 2018-10-12 19:41:49 +0530 | [diff] [blame] | 91 | fallback: ['glib', 'libglib_dep']) |
Tim-Philipp Müller | 49ba211 | 2018-11-12 15:36:27 +0000 | [diff] [blame] | 92 | gobject_dep = dependency('gobject-2.0', required: get_option('gobject'), |
Nirbheek Chauhan | f65def4 | 2018-10-12 19:41:49 +0530 | [diff] [blame] | 93 | fallback: ['glib', 'libgobject_dep']) |
Chun-wei Fan | 9d0e6ae | 2020-03-13 16:56:55 +0800 | [diff] [blame] | 94 | cairo_dep = dependency('cairo', required: false) |
Tim-Philipp Müller | 49ba211 | 2018-11-12 15:36:27 +0000 | [diff] [blame] | 95 | fontconfig_dep = dependency('fontconfig', required: get_option('fontconfig'), |
Nirbheek Chauhan | f65def4 | 2018-10-12 19:41:49 +0530 | [diff] [blame] | 96 | fallback: ['fontconfig', 'fontconfig_dep']) |
Tim-Philipp Müller | 49ba211 | 2018-11-12 15:36:27 +0000 | [diff] [blame] | 97 | graphite2_dep = dependency('graphite2', required: get_option('graphite')) |
Christoph Reiter | 8ae06c9 | 2020-04-18 20:22:45 +0200 | [diff] [blame] | 98 | icu_dep = dependency('icu-uc', required: false) |
Mathieu Duponchelle | fce88f9 | 2018-05-17 16:20:10 +0200 | [diff] [blame] | 99 | m_dep = cpp.find_library('m', required: false) |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 100 | |
Christoph Reiter | 8ae06c9 | 2020-04-18 20:22:45 +0200 | [diff] [blame] | 101 | if not icu_dep.found() and get_option('icu').enabled() |
| 102 | icu_dep = dependency('icu-uc', required: cpp.get_id() != 'msvc') |
| 103 | endif |
| 104 | |
Chun-wei Fan | 5efce60 | 2020-03-13 16:40:20 +0800 | [diff] [blame] | 105 | if not icu_dep.found() and cpp.get_id() == 'msvc' |
| 106 | if cpp.has_header('unicode/uchar.h') and \ |
| 107 | cpp.has_header('unicode/unorm2.h') and \ |
| 108 | cpp.has_header('unicode/ustring.h') and \ |
| 109 | cpp.has_header('unicode/utf16.h') and \ |
| 110 | cpp.has_header('unicode/uversion.h') and \ |
| 111 | cpp.has_header('unicode/uscript.h') |
| 112 | if get_option('buildtype') == 'debug' |
| 113 | icu_dep = cpp.find_library('icuucd', required: get_option('icu')) |
| 114 | else |
| 115 | icu_dep = cpp.find_library('icuuc', required: get_option('icu')) |
| 116 | endif |
| 117 | else |
| 118 | if get_option('icu').enabled() |
| 119 | error('ICU headers and libraries must be present to build ICU support') |
| 120 | endif |
| 121 | endif |
| 122 | endif |
| 123 | |
Chun-wei Fan | 9d0e6ae | 2020-03-13 16:56:55 +0800 | [diff] [blame] | 124 | if not cairo_dep.found() and cpp.get_id() == 'msvc' |
| 125 | if cpp.has_header('cairo.h') |
| 126 | cairo_dep = cpp.find_library('cairo') |
| 127 | endif |
| 128 | endif |
| 129 | |
| 130 | if not cairo_dep.found() and get_option('cairo').enabled() |
| 131 | cairo_dep = dependency('cairo', fallback: ['cairo', 'libcairo_dep']) |
| 132 | endif |
| 133 | |
Nirbheek Chauhan | f65def4 | 2018-10-12 19:41:49 +0530 | [diff] [blame] | 134 | # Ensure that cairo-ft is fetched from the same library as cairo itself |
| 135 | if cairo_dep.found() |
| 136 | if cairo_dep.type_name() == 'pkgconfig' |
Tim-Philipp Müller | 49ba211 | 2018-11-12 15:36:27 +0000 | [diff] [blame] | 137 | cairo_ft_dep = dependency('cairo-ft', required: get_option('cairo')) |
Nirbheek Chauhan | f65def4 | 2018-10-12 19:41:49 +0530 | [diff] [blame] | 138 | else |
Chun-wei Fan | 9d0e6ae | 2020-03-13 16:56:55 +0800 | [diff] [blame] | 139 | if cpp.has_header('cairo-ft.h') and \ |
| 140 | cpp.has_function('cairo_ft_font_face_create_for_ft_face', dependencies: cairo_dep) |
| 141 | cairo_ft_dep = cairo_dep |
| 142 | endif |
Nirbheek Chauhan | f65def4 | 2018-10-12 19:41:49 +0530 | [diff] [blame] | 143 | endif |
| 144 | else |
| 145 | # Not-found dependency |
| 146 | cairo_ft_dep = dependency('', required: false) |
| 147 | endif |
| 148 | |
Mathieu Duponchelle | fce88f9 | 2018-05-17 16:20:10 +0200 | [diff] [blame] | 149 | deps = [] |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 150 | |
| 151 | conf = configuration_data() |
Tim-Philipp Müller | 618584e | 2018-11-14 20:19:36 +0000 | [diff] [blame] | 152 | incconfig = include_directories('.') |
Tim-Philipp Müller | a3892be | 2020-03-14 01:08:15 +0000 | [diff] [blame] | 153 | |
| 154 | add_project_arguments('-DHAVE_CONFIG_H', language: ['c', 'cpp']) |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 155 | |
| 156 | warn_cflags = [ |
| 157 | '-Wno-non-virtual-dtor', |
| 158 | ] |
| 159 | |
Tim-Philipp Müller | a3892be | 2020-03-14 01:08:15 +0000 | [diff] [blame] | 160 | cpp_args = cpp.get_supported_arguments(warn_cflags) |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 161 | |
Mathieu Duponchelle | fce88f9 | 2018-05-17 16:20:10 +0200 | [diff] [blame] | 162 | if m_dep.found() |
| 163 | deps += [m_dep] |
| 164 | endif |
| 165 | |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 166 | if glib_dep.found() |
| 167 | conf.set('HAVE_GLIB', 1) |
| 168 | deps += [glib_dep] |
| 169 | endif |
| 170 | |
| 171 | if gobject_dep.found() |
| 172 | conf.set('HAVE_GOBJECT', 1) |
| 173 | deps += [gobject_dep] |
| 174 | endif |
| 175 | |
| 176 | if cairo_dep.found() |
| 177 | conf.set('HAVE_CAIRO', 1) |
| 178 | deps += [cairo_dep] |
| 179 | endif |
| 180 | |
| 181 | if cairo_ft_dep.found() |
| 182 | conf.set('HAVE_CAIRO_FT', 1) |
| 183 | deps += [cairo_ft_dep] |
| 184 | endif |
| 185 | |
| 186 | if graphite2_dep.found() |
| 187 | conf.set('HAVE_GRAPHITE2', 1) |
| 188 | deps += [graphite2_dep] |
| 189 | endif |
| 190 | |
| 191 | if icu_dep.found() |
| 192 | conf.set('HAVE_ICU', 1) |
Ebrahim Byagowi | c6b3f73 | 2020-04-19 00:54:24 +0430 | [diff] [blame^] | 193 | endif |
| 194 | |
| 195 | if get_option('icu-builtin') |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 196 | conf.set('HAVE_ICU_BUILTIN', 1) |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 197 | endif |
| 198 | |
| 199 | if freetype_dep.found() |
| 200 | conf.set('HAVE_FREETYPE', 1) |
| 201 | deps += [freetype_dep] |
Mathieu Duponchelle | 04bcdb9 | 2018-06-05 20:59:29 +0200 | [diff] [blame] | 202 | check_freetype_funcs = [ |
| 203 | ['FT_Get_Var_Blend_Coordinates', {'deps': freetype_dep}], |
| 204 | ['FT_Set_Var_Blend_Coordinates', {'deps': freetype_dep}], |
| 205 | ['FT_Done_MM_Var', {'deps': freetype_dep}], |
| 206 | ] |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 207 | |
| 208 | if freetype_dep.type_name() == 'internal' |
| 209 | foreach func: check_freetype_funcs |
| 210 | name = func[0] |
| 211 | conf.set('HAVE_@0@'.format(name.to_upper()), 1) |
| 212 | endforeach |
| 213 | else |
| 214 | check_funcs += check_freetype_funcs |
| 215 | endif |
| 216 | endif |
| 217 | |
| 218 | if fontconfig_dep.found() |
| 219 | conf.set('HAVE_FONTCONFIG', 1) |
| 220 | deps += [fontconfig_dep] |
| 221 | endif |
| 222 | |
Chun-wei Fan | 838346c | 2020-03-13 18:01:17 +0800 | [diff] [blame] | 223 | # GDI (uniscribe) (windows) |
| 224 | if host_machine.system() == 'windows' and not get_option('gdi').disabled() |
Tim-Philipp Müller | b7796a5 | 2018-11-12 16:56:56 +0000 | [diff] [blame] | 225 | # TODO: make nicer once we have https://github.com/mesonbuild/meson/issues/3940 |
| 226 | if cpp.has_header('usp10.h') and cpp.has_header('windows.h') |
| 227 | foreach usplib : ['usp10', 'gdi32', 'rpcrt4'] |
| 228 | deps += [cpp.find_library(usplib, required: true)] |
| 229 | endforeach |
| 230 | conf.set('HAVE_UNISCRIBE', 1) |
Chun-wei Fan | 838346c | 2020-03-13 18:01:17 +0800 | [diff] [blame] | 231 | conf.set('HAVE_GDI', 1) |
| 232 | elif get_option('gdi').enabled() |
| 233 | error('gdi was enabled explicitly, but some required headers are missing.') |
Tim-Philipp Müller | b7796a5 | 2018-11-12 16:56:56 +0000 | [diff] [blame] | 234 | endif |
| 235 | endif |
| 236 | |
Chun-wei Fan | 7baa8e0 | 2020-03-13 16:21:25 +0800 | [diff] [blame] | 237 | # DirectWrite (windows) |
Tim-Philipp Müller | 83ebbe4 | 2018-11-12 16:56:56 +0000 | [diff] [blame] | 238 | if host_machine.system() == 'windows' and not get_option('directwrite').disabled() |
Chun-wei Fan | 7baa8e0 | 2020-03-13 16:21:25 +0800 | [diff] [blame] | 239 | if cpp.has_header('dwrite_1.h') |
Tim-Philipp Müller | 83ebbe4 | 2018-11-12 16:56:56 +0000 | [diff] [blame] | 240 | deps += [cpp.find_library('dwrite', required: true)] |
| 241 | conf.set('HAVE_DIRECTWRITE', 1) |
| 242 | elif get_option('directwrite').enabled() |
| 243 | error('DirectWrite was enabled explicitly, but required header is missing.') |
| 244 | endif |
| 245 | endif |
| 246 | |
Tim-Philipp Müller | 4840c82 | 2018-11-12 16:56:56 +0000 | [diff] [blame] | 247 | # CoreText (macOS) - FIXME: untested |
| 248 | if host_machine.system() == 'darwin' and not get_option('coretext').disabled() |
| 249 | app_services_dep = dependency('appleframeworks', modules : ['ApplicationServices'], required: false) |
| 250 | if cpp.has_type('CTFontRef', prefix: '#include <ApplicationServices/ApplicationServices.h>', dependencies: app_services_dep) |
| 251 | deps += [app_services_dep] |
| 252 | conf.set('HAVE_CORETEXT', 1) |
| 253 | # On iOS CoreText and CoreGraphics are stand-alone frameworks |
| 254 | # Check for a different symbol to avoid getting cached result |
| 255 | else |
| 256 | coretext_dep = dependency('appleframeworks', modules : ['CoreText'], required: false) |
| 257 | coregraphics_dep = dependency('appleframeworks', modules : ['CoreGraphics'], required: false) |
| 258 | corefoundation_dep = dependency('appleframeworks', modules : ['CoreFoundation'], required: false) |
| 259 | if cpp.has_type('CTRunRef', prefix: '#include <CoreText/CoreText.h>', dependencies: [coretext_dep, coregraphics_dep, corefoundation_dep]) |
| 260 | deps += [coretext_dep, coregraphics_dep, corefoundation_dep] |
| 261 | conf.set('HAVE_CORETEXT', 1) |
| 262 | elif get_option('coretext').enabled() |
| 263 | error('CoreText was enabled explicitly, but required headers or frameworks are missing.') |
| 264 | endif |
| 265 | endif |
| 266 | endif |
| 267 | |
Tim-Philipp Müller | b7796a5 | 2018-11-12 16:56:56 +0000 | [diff] [blame] | 268 | # threads |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 269 | if host_machine.system() != 'windows' |
| 270 | thread_dep = dependency('threads', required: false) |
| 271 | |
| 272 | if thread_dep.found() |
| 273 | conf.set('HAVE_PTHREAD', 1) |
| 274 | deps += [thread_dep] |
| 275 | else |
| 276 | check_headers += ['sched.h'] |
| 277 | check_funcs += ['sched_yield', {'link_with': 'rt'}] |
| 278 | endif |
| 279 | endif |
| 280 | |
Mathieu Duponchelle | 04bcdb9 | 2018-06-05 20:59:29 +0200 | [diff] [blame] | 281 | conf.set('HAVE_OT', 1) |
| 282 | conf.set('HAVE_FALLBACK', 1) |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 283 | conf.set_quoted('PACKAGE_NAME', 'HarfBuzz') |
| 284 | conf.set_quoted('PACKAGE_VERSION', meson.project_version()) |
| 285 | |
| 286 | foreach check : check_headers |
| 287 | name = check[0] |
| 288 | |
| 289 | if cpp.has_header(name) |
| 290 | conf.set('HAVE_@0@'.format(name.to_upper().underscorify()), 1) |
| 291 | endif |
| 292 | endforeach |
| 293 | |
| 294 | foreach check : check_funcs |
| 295 | name = check[0] |
Mathieu Duponchelle | 04bcdb9 | 2018-06-05 20:59:29 +0200 | [diff] [blame] | 296 | opts = check.get(1, {}) |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 297 | link_withs = opts.get('link_with', []) |
Mathieu Duponchelle | 04bcdb9 | 2018-06-05 20:59:29 +0200 | [diff] [blame] | 298 | check_deps = opts.get('deps', []) |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 299 | extra_deps = [] |
| 300 | found = true |
| 301 | |
| 302 | # First try without linking |
| 303 | |
Mathieu Duponchelle | 04bcdb9 | 2018-06-05 20:59:29 +0200 | [diff] [blame] | 304 | found = cpp.has_function(name, dependencies: check_deps) |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 305 | |
| 306 | if not found and link_withs.length() > 0 |
| 307 | found = true |
| 308 | |
| 309 | foreach link_with : link_withs |
| 310 | dep = cpp.find_library(link_with, required: false) |
| 311 | if dep.found() |
Ebrahim Byagowi | e8808c1 | 2020-03-24 19:15:09 +0430 | [diff] [blame] | 312 | extra_deps += dep |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 313 | else |
Ebrahim Byagowi | e8808c1 | 2020-03-24 19:15:09 +0430 | [diff] [blame] | 314 | found = false |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 315 | endif |
| 316 | endforeach |
| 317 | |
| 318 | if found |
Mathieu Duponchelle | 04bcdb9 | 2018-06-05 20:59:29 +0200 | [diff] [blame] | 319 | found = cpp.has_function(name, dependencies: check_deps + extra_deps) |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 320 | endif |
| 321 | endif |
| 322 | |
| 323 | if found |
| 324 | deps += extra_deps |
| 325 | conf.set('HAVE_@0@'.format(name.to_upper()), 1) |
| 326 | endif |
| 327 | endforeach |
| 328 | |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 329 | if cpp.links(files('meson-cc-tests/intel-atomic-primitives-test.c'), name: 'Intel atomics') |
| 330 | conf.set('HAVE_INTEL_ATOMIC_PRIMITIVES', 1) |
| 331 | endif |
| 332 | |
| 333 | if cpp.links(files('meson-cc-tests/solaris-atomic-operations.c'), name: 'Solaris atomic ops') |
| 334 | conf.set('HAVE_SOLARIS_ATOMIC_OPS', 1) |
| 335 | endif |
| 336 | |
| 337 | subdir('src') |
| 338 | subdir('util') |
Tim-Philipp Müller | 6147df3 | 2018-11-14 10:12:40 +0000 | [diff] [blame] | 339 | |
| 340 | if not get_option('tests').disabled() |
| 341 | subdir('test') |
| 342 | endif |
Mathieu Duponchelle | 920efc0 | 2018-05-17 01:28:53 +0200 | [diff] [blame] | 343 | |
| 344 | configure_file(output: 'config.h', configuration: conf) |