Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not specify version of cfitsio on windows #199

Merged
merged 3 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
## [Unreleased]
### Added
### Changed

* `fitsio-sys`: do not specify the version for msys2 since it is not well represented

### Removed

## [0.21.0]
Expand Down
9 changes: 8 additions & 1 deletion fitsio-sys-bindgen/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ use std::io::Write;
use std::path::PathBuf;

fn main() {
let package_name = "cfitsio >= 3.37";
// `msys2` does not report the version of cfitsio correctly, so ignore the version specifier for now.
let package_name = if cfg!(windows) {
let msg = "No version specifier available for pkg-config on windows, so the version of cfitsio used when compiling this program is unspecified";
println!("cargo:warning={msg}");
"cfitsio"
} else {
"cfitsio >= 3.37"
};
let mut config = pkg_config::Config::new();
config.print_system_libs(true);
config.print_system_cflags(true);
Expand Down
2 changes: 1 addition & 1 deletion fitsio-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fitsio-sys"
version = "0.5.0"
version = "0.5.1"
edition = "2018"
authors = ["Simon Walker <[email protected]>"]
description = "FFI wrapper around cfitsio"
Expand Down
9 changes: 8 additions & 1 deletion fitsio-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ fn bind_cfitsio() {
use pkg_config::Error;
use std::io::Write;

let package_name = "cfitsio >= 3.37";
// `msys2` does not report the version of cfitsio correctly, so ignore the version specifier for now.
let package_name = if cfg!(windows) {
let msg = "No version specifier available for pkg-config on windows, so the version of cfitsio used when compiling this program is unspecified";
println!("cargo:warning={msg}");
"cfitsio"
} else {
"cfitsio >= 3.37"
};
let mut config = pkg_config::Config::new();
config.print_system_libs(true);
config.print_system_cflags(true);
Expand Down