From fde19add2fb8e2cd0b427f4025ecf9f468438e0d Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Tue, 16 Jan 2024 14:41:06 -0500 Subject: [PATCH] fix: deps must be resolved in first setup attempt --- .github/workflows/ci.yml | 11 +++++++---- meson/resolve-dependencies.py | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45695468..6faf69d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,13 +133,16 @@ jobs: echo opts=$(meson/resolve-dependencies.py $args --cli) >> $GITHUB_OUTPUT - name: meson setup run: | - # use the example INI file, and override some of its options - meson setup --native-file meson/build-iguana.ini build-iguana - meson configure \ + # use the example INI file, adding `prefix` and dependency resolution opts + meson setup \ + --native-file meson/build-iguana.ini \ --prefix=$(pwd)/iguana \ + ${{ steps.deps.outputs.opts }} \ + build-iguana + # then override project build options + meson configure \ -Dexamples=True \ -Ddocumentation=False \ - ${{ steps.deps.outputs.opts }} \ ${{ matrix.binding_opts }} \ build-iguana - name: dump build options diff --git a/meson/resolve-dependencies.py b/meson/resolve-dependencies.py index 04e643b6..33909f78 100755 --- a/meson/resolve-dependencies.py +++ b/meson/resolve-dependencies.py @@ -81,9 +81,9 @@ def ini_string_arr(arr): # CLI options cli_opts = [] if(len(pkg_config_path) > 0): - cli_opts.append(f'-Dpkg_config_path=\'{",".join(pkg_config_path)}\'') + cli_opts.append(f'--pkg_config_path=\'{",".join(pkg_config_path)}\'') if(len(cmake_prefix_path) > 0): - cli_opts.append(f'-Dcmake_prefix_path=\'{",".join(cmake_prefix_path)}\'') + cli_opts.append(f'--cmake_prefix_path=\'{",".join(cmake_prefix_path)}\'') ################################################## # print