Skip to content

Commit 5b4ca86

Browse files
committed
Workaround for forced paths in openvr CMakeLists.txt.
1 parent ebca3aa commit 5b4ca86

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "openvr_sys"
3-
version = "2.1.0"
3+
version = "2.1.1"
44
edition = "2021"
55
rust-version = "1.82.0"
66
authors = [

build.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,19 @@ fn main() {
1212
let target_pointer_width = env::var("CARGO_CFG_TARGET_POINTER_WIDTH").unwrap();
1313

1414
// Configure cmake to place build output in OUT_DIR
15+
let out_dir_str = out_dir.to_string_lossy().into_owned();
1516
let mut config = cmake::Config::new("openvr");
16-
config.out_dir(&out_dir);
17+
let config = config
18+
.define("CMAKE_LIBRARY_OUTPUT_DIRECTORY", &out_dir_str)
19+
.define("CMAKE_ARCHIVE_OUTPUT_DIRECTORY", &out_dir_str)
20+
.define("CMAKE_RUNTIME_OUTPUT_DIRECTORY", &out_dir_str)
21+
.define("CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG", &out_dir_str)
22+
.define("CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE", &out_dir_str)
23+
.define("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG", &out_dir_str)
24+
.define("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE", &out_dir_str)
25+
.define("CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG", &out_dir_str)
26+
.define("CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE", &out_dir_str)
27+
.out_dir(&out_dir);
1728

1829
if target_os == "macos" {
1930
config.define("BUILD_UNIVERSAL", "OFF");

0 commit comments

Comments
 (0)