Skip to content

Commit

Permalink
build(windows): add some flags for windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
ssssota committed Jan 28, 2025
1 parent 9e28687 commit a0f789d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ jobs:
rust: 1.63.0
- name: macOS / stable
os: macOS-latest
# TODO: fix
# - name: windows / stable
# os: windows-latest
- name: windows / stable
os: windows-latest

steps:
- name: Checkout
Expand Down
9 changes: 8 additions & 1 deletion libraw-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@ fn build(out_dir: &Path) {
libraw.flag_if_supported("-Wno-unused-result");
libraw.flag_if_supported("-Wno-format-overflow");
// thread safety
libraw.flag("-pthread");
libraw.flag_if_supported("-pthread");
// for Windows
libraw.flag_if_supported("/EHsc");
libraw.flag_if_supported("/MP");
libraw.flag_if_supported("/DWIN32");
libraw.flag_if_supported("/DLIBRAW_NODLL");
libraw.flag_if_supported("/DLIBRAW_BUILDLIB");

libraw.static_flag(true);
libraw.compile("raw");

Expand Down

0 comments on commit a0f789d

Please sign in to comment.