fn compile_aws_crt_ffi()

in aws-crt-sys/build.rs [54:84]


fn compile_aws_crt_ffi() {
    let profile = env::var("PROFILE").unwrap();
    let out_dir = env::var("OUT_DIR").unwrap();

    let cmake_build_type = match profile.as_str() {
        "debug" => "Debug",
        _ => "RelWithDebInfo",
    };

    let mut cmake_config = cmake::Config::new("..");
    cmake_config
        .profile(cmake_build_type)
        .define("CMAKE_INSTALL_LIBDIR", "lib")
        .define("BUILD_SHARED_LIBS", "OFF")
        .define("USE_OPENSSL", env::var("USE_OPENSSL").unwrap_or("false".to_owned()));

    configure_cmake_for_platform(&mut cmake_config);
    cmake_config.build();

    println!("cargo:rustc-link-search={}", Path::new(&out_dir).join("lib").to_str().unwrap());
    println!("cargo:rustc-link-lib={}", "aws-crt-ffi");
    println!("cargo:rustc-link-lib={}", "aws-c-auth");
    println!("cargo:rustc-link-lib={}", "aws-c-http");
    println!("cargo:rustc-link-lib={}", "aws-c-cal");
    println!("cargo:rustc-link-lib={}", "aws-c-compression");
    println!("cargo:rustc-link-lib={}", "aws-c-io");
    println!("cargo:rustc-link-lib={}", "aws-c-cal");
    println!("cargo:rustc-link-lib={}", "aws-checksums");
    println!("cargo:rustc-link-lib={}", "aws-c-common");
    configure_link_for_platform();
}