diff --git a/c_impl/CMakeLists.txt b/c_impl/CMakeLists.txt index b4edbb5..4f5b6e8 100644 --- a/c_impl/CMakeLists.txt +++ b/c_impl/CMakeLists.txt @@ -40,7 +40,7 @@ if(CMAKE_BUILD_TYPE MATCHES "Debug") target_include_directories(NetworkTest PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src) endif() -install(TARGETS UDPConnection CONFIGURATIONS Release DESTINATION lib) +install(TARGETS UDPConnection DESTINATION lib) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/UDPConnection.h ${CMAKE_CURRENT_SOURCE_DIR}/src/UDPC_Defines.h diff --git a/rust_binding/build.rs b/rust_binding/build.rs index 8388d16..197c169 100644 --- a/rust_binding/build.rs +++ b/rust_binding/build.rs @@ -6,16 +6,13 @@ use std::path::PathBuf; fn main() { let mut config = Config::new("../c_impl"); - let mut dst: PathBuf; if env::var("PROFILE").unwrap().eq("release") { config.define("CMAKE_BUILD_TYPE", "Release"); - dst = config.build(); - dst.push("lib"); } else { config.define("CMAKE_BUILD_TYPE", "Debug"); - dst = config.build(); - dst.push("build"); } + let mut dst = config.build(); + dst.push("lib"); println!("cargo:rustc-link-search=native={}", dst.display()); println!("cargo:rustc-link-lib=static=UDPConnection");