Skip to content

Commit

Permalink
set compile and link options for x86
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty2501 committed Jul 18, 2022
1 parent 759181d commit 83f7eef
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/open_jtalk-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "open_jtalk-sys"
version = "0.10.111"
version = "0.11.111"
edition = "2021"

[features]
Expand Down
4 changes: 1 addition & 3 deletions crates/open_jtalk-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ fn main() {
let mut cmake_conf = cmake::Config::new("open_jtalk");
let target = env::var("TARGET").unwrap();
let cmake_conf = if target.starts_with("i686") {
cmake_conf
.define("CMAKE_CXX_FLAGS", "-m32")
.define("CMAKE_C_FLAGS", "-m32")
cmake_conf.define("OPEN_JTALK_X86", "true")
} else {
&mut cmake_conf
};
Expand Down
6 changes: 6 additions & 0 deletions crates/open_jtalk-sys/open_jtalk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ FetchContent_Declare(
SOURCE_SUBDIR src)
FetchContent_MakeAvailable(openjtalk)

if(DEFINED OPEN_JTALK_X86)
set_target_properties(openjtalk PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS
"-m32")

endif()

install(TARGETS openjtalk LIBRARY DESTINATION lib)
install(
FILES
Expand Down
4 changes: 2 additions & 2 deletions crates/open_jtalk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "open_jtalk"
version = "0.1.19"
version = "0.1.20"
edition = "2021"

[dependencies]
open_jtalk-sys = { path = "../open_jtalk-sys", version = "0.10.111" }
open_jtalk-sys = { path = "../open_jtalk-sys", version = "0.11.111" }
thiserror = "1.0.31"

[dev-dependencies]
Expand Down

0 comments on commit 83f7eef

Please sign in to comment.