diff --git a/.circleci/config.yml b/.circleci/config.yml index 495a6a9d9..73fd82932 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -68,7 +68,7 @@ jobs: - run: | python3 -m venv venv source venv/bin/activate - pip3 install meson==0.56.0 + pip3 install meson==0.60.0 CC=clang CXX=clang++ meson setup build --default-library=static -Db_sanitize=address,undefined --buildtype=debugoptimized --wrap-mode=nodownload -Dexperimental_api=true meson compile -Cbuild -j9 meson test -Cbuild -t 10 --print-errorlogs | asan_symbolize | c++filt @@ -83,7 +83,7 @@ jobs: - run: | python3 -m venv venv source venv/bin/activate - pip3 install meson==0.56.0 + pip3 install meson==0.60.0 CC=clang CXX=clang++ meson setup build --default-library=static -Db_sanitize=thread --buildtype=debugoptimized --wrap-mode=nodownload -Dexperimental_api=true meson compile -Cbuild -j9 meson test -Cbuild -t 10 --print-errorlogs | asan_symbolize | c++filt @@ -98,7 +98,7 @@ jobs: - run: | python3 -m venv venv source venv/bin/activate - pip3 install meson==0.56.0 + pip3 install meson==0.60.0 # msan, needs --force-fallback-for=glib,freetype2 also which doesn't work yet but runs fuzzer cases at least CC=clang CXX=clang++ meson setup build --default-library=static -Db_sanitize=memory --buildtype=debugoptimized --wrap-mode=nodownload -Dauto_features=disabled -Dtests=enabled -Dexperimental_api=true meson compile -Cbuild -j9 diff --git a/meson.build b/meson.build index fa02aef25..41f24b2cb 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('harfbuzz', ['c', 'cpp'], - meson_version: '>= 0.55.0', + meson_version: '>= 0.60.0', version: '11.0.1', default_options: [ 'cpp_eh=none', # Just to support msvc, we are passing -fno-exceptions also anyway @@ -145,38 +145,12 @@ wasm_dep = cpp.find_library('iwasm', required: get_option('wasm')) # How to check whether iwasm was built, and hence requires, LLVM? #llvm_dep = cpp.find_library('LLVM-15', required: get_option('wasm')) -if meson.version().version_compare('>=0.60.0') - # pkg-config: icu-uc, cmake: ICU but with components - icu_dep = dependency('icu-uc', 'ICU', - version: icu_min_version, - components: 'uc', - required: get_option('icu'), - allow_fallback: true) -else - # painful hack to handle multiple dependencies but also respect options - icu_opt = get_option('icu') - # we want to handle enabled manually after fallbacks, but also handle disabled normally - if icu_opt.enabled() - icu_opt = false - endif - # try pkg-config name - icu_dep = dependency('icu-uc', version: icu_min_version, method: 'pkg-config', required: icu_opt) - # when disabled, leave it not-found - if not icu_dep.found() and not get_option('icu').disabled() - # Try cmake name - icu_dep = dependency('ICU', version: icu_min_version, method: 'cmake', components: 'uc', required: false) - # Try again with subproject fallback. `allow_fallback: true` means the - # fallback will be tried even if the icu option is set to `auto`, but - # we cannot pass this option until Meson 0.59.0, because no wrap file - # is checked into git. - if not icu_dep.found() - icu_dep = dependency('icu-uc', - version: icu_min_version, - method: 'pkg-config', - required: get_option('icu')) - endif - endif -endif +# pkg-config: icu-uc, cmake: ICU but with components +icu_dep = dependency('icu-uc', 'ICU', + version: icu_min_version, + components: 'uc', + required: get_option('icu'), + allow_fallback: true) if icu_dep.found() and icu_dep.version().version_compare('>=75.1') and (get_option('cpp_std') == 'c++11' or get_option('cpp_std') == 'c++14') cpp17_arg = cpp.get_argument_syntax() == 'msvc' ? '/std:c++17' : '-std=c++17' @@ -466,12 +440,10 @@ configure_file(output: 'config.h', configuration: conf) alias_target('lib', libharfbuzz) alias_target('libs', libharfbuzz, libharfbuzz_subset) -if meson.version().version_compare('>=0.57.0') - # Re glib, see https://github.com/harfbuzz/harfbuzz/issues/4153#issuecomment-2646347531 - add_test_setup('default', - exclude_suites: ['google-benchmark'], - is_default: glib_dep.type_name() != 'internal' and not meson.is_subproject()) -endif +# Re glib, see https://github.com/harfbuzz/harfbuzz/issues/4153#issuecomment-2646347531 +add_test_setup('default', + exclude_suites: ['google-benchmark'], + is_default: glib_dep.type_name() != 'internal' and not meson.is_subproject()) build_summary = { 'Directories': diff --git a/src/meson.build b/src/meson.build index c3e01cc6d..68e6e96c6 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1039,7 +1039,7 @@ if get_option('tests').enabled() env = environment() env.set('srcdir', meson.current_source_dir()) - env.set('base_srcdir', meson.source_root()) + env.set('base_srcdir', meson.project_source_root()) env.set('builddir', meson.current_build_dir()) env.set('libs', meson.current_build_dir()) # TODO: Merge this with builddir after autotools removal HBSOURCES = []