From 198b5da8230db9c5b80194be4d475d2fa09550c1 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Fri, 11 May 2018 12:42:00 +0100 Subject: [PATCH] Fix building Rust libraries with C++ headers using Rust 1.26.0 I've filed rust-lang/cargo#5518 about this as the previous command worked as expected in Rust 1.25.0. It's probably not a bad idea to be more specific though. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 88b61fbe..b620bf75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,7 +77,7 @@ ExternalProject_Add(esplugin URL "https://github.com/WrinklyNinja/esplugin/archive/1.0.9.tar.gz" CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 - BUILD_COMMAND cargo build --release --all --all-features --target ${RUST_TARGET} + BUILD_COMMAND cargo build --release --manifest-path ffi/Cargo.toml --features ffi-headers --target ${RUST_TARGET} INSTALL_COMMAND "") ExternalProject_Get_Property(esplugin SOURCE_DIR) set (ESPLUGIN_INCLUDE_DIRS "${SOURCE_DIR}/ffi/include") @@ -103,7 +103,7 @@ ExternalProject_Add(libloadorder URL "https://github.com/WrinklyNinja/libloadorder/archive/11.2.1.tar.gz" CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 - BUILD_COMMAND cargo build --release --all --all-features --target ${RUST_TARGET} + BUILD_COMMAND cargo build --release --manifest-path ffi/Cargo.toml --features ffi-headers --target ${RUST_TARGET} INSTALL_COMMAND "") ExternalProject_Get_Property(libloadorder SOURCE_DIR) set(LIBLOADORDER_INCLUDE_DIRS "${SOURCE_DIR}/ffi/include")