Directly link to MSYS2's .dll.a files
This commit is contained in:
17
.github/workflows/test-msys2.yaml
vendored
17
.github/workflows/test-msys2.yaml
vendored
@ -4,7 +4,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE_MAGICK_LIBS: "MagickCore-7.Q16HDRI;MagickWand-7.Q16HDRI"
|
IMAGE_MAGICK_LIBS: "libMagickCore-7.Q16HDRI.dll.a;libMagickWand-7.Q16HDRI.dll.a"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -16,21 +16,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
export PATH="/mingw64/bin:$PATH"
|
export PATH="/mingw64/bin:$PATH"
|
||||||
pacman --noconfirm -S mingw-w64-x86_64-imagemagick mingw-w64-x86_64-pkg-config
|
pacman --noconfirm -S mingw-w64-x86_64-imagemagick mingw-w64-x86_64-pkg-config
|
||||||
cd /mingw64/lib
|
|
||||||
mv libMagickCore-7.Q16HDRI.dll.a MagickCore-7.Q16HDRI.lib
|
|
||||||
mv libMagickWand-7.Q16HDRI.dll.a MagickWand-7.Q16HDRI.lib
|
|
||||||
|
|
||||||
- name: Set environment variables
|
|
||||||
shell: C:\msys64\usr\bin\bash.exe --login '{0}'
|
|
||||||
run: |
|
|
||||||
export PATH="/mingw64/bin:$PATH"
|
|
||||||
echo "BINDGEN_EXTRA_CLANG_ARGS=$(MagickCore-config --cppflags)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
cache-on-failure: true
|
cache-on-failure: true
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
echo $env:BINDGEN_EXTRA_CLANG_ARGS
|
$env:PATH = "C:\msys64\usr\bin;C:\msys64\mingw64\bin;$env:PATH"
|
||||||
$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:PATH"
|
cargo test -- --skip test_set_background_color
|
||||||
cargo test test_new_drop -- --nocapture
|
|
||||||
|
|||||||
5
build.rs
5
build.rs
@ -260,6 +260,11 @@ fn determine_mode<T: AsRef<str>>(libdirs: &Vec<PathBuf>, libs: &[T]) -> &'static
|
|||||||
(true, false) => return "static",
|
(true, false) => return "static",
|
||||||
(false, true) => return "dylib",
|
(false, true) => return "dylib",
|
||||||
(false, false) => {
|
(false, false) => {
|
||||||
|
let can_static_verbatim = libs.iter().all(|l| files.contains(l.as_ref()));
|
||||||
|
if can_static_verbatim {
|
||||||
|
return "static:+verbatim";
|
||||||
|
}
|
||||||
|
|
||||||
panic!(
|
panic!(
|
||||||
"ImageMagick libdirs at `{:?}` do not contain the required files \
|
"ImageMagick libdirs at `{:?}` do not contain the required files \
|
||||||
to either statically or dynamically link ImageMagick",
|
to either statically or dynamically link ImageMagick",
|
||||||
|
|||||||
Reference in New Issue
Block a user