mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
RDCT-1171: fix unix compilation
GitOrigin-RevId: 56228ecc1385a23857686e9fb16f8caa979099c6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
027a59d5b8
commit
2e446a8b2d
@@ -1,10 +1,11 @@
|
||||
// technically we shouldn't use #cfg in build.rs due to cross-compilation,
|
||||
// but the only we do is windows x64 -> arm64, so it's fine for our purposes
|
||||
|
||||
use std::path::{PathBuf};
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
use winresource::WindowsResource;
|
||||
|
||||
// technically we shouldn't use #cfg here due to cross-compilation,
|
||||
// but the only we do is windows x64 -> arm64, so it's fine for our purposes
|
||||
|
||||
fn main() {
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
main_os_specific()
|
||||
@@ -24,6 +25,7 @@ fn main_os_specific() {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
fn enable_symlinks_if_can_create_them() {
|
||||
let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
|
||||
let target = out_dir.join("target");
|
||||
@@ -54,6 +56,7 @@ fn enable_symlinks_if_can_create_them() {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
fn embed_metadata() {
|
||||
let cargo_root_env_var = std::env::var("CARGO_MANIFEST_DIR").unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user