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
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");