Build cbindgen once across all Rust dependencies

This commit is contained in:
Oliver Hamlet
2018-10-23 08:37:53 +01:00
parent ad3893069c
commit 0614c2d7a7
3 changed files with 10 additions and 4 deletions
+2
View File
@@ -34,6 +34,8 @@ install:
- tar -xf doxygen-1.8.12.linux.bin.tar.gz
# Add Doxygen binary path to PATH
- export PATH="$PWD/doxygen-1.8.12/bin:$PATH"
# Install cbindgen for generating C++ headers for Rust dependencies.
- cbindgen --version || cargo install cbindgen --version 0.6.6
before_script:
- mkdir build
+7 -4
View File
@@ -76,10 +76,11 @@ set (GTEST_LIBRARIES "${BINARY_DIR}/googlemock/gtest/${CMAKE_CFG_INTDIR}/${CMAKE
ExternalProject_Add(esplugin
PREFIX "external"
URL "https://github.com/WrinklyNinja/esplugin/archive/2.1.0.tar.gz"
URL "https://github.com/WrinklyNinja/esplugin/archive/2.1.1.tar.gz"
CONFIGURE_COMMAND ""
BUILD_IN_SOURCE 1
BUILD_COMMAND cargo build --release --manifest-path ffi/Cargo.toml --features ffi-headers --target ${RUST_TARGET}
BUILD_COMMAND cargo build --release --manifest-path ffi/Cargo.toml --target ${RUST_TARGET} &&
cbindgen ffi/ -o ffi/include/esplugin.hpp
INSTALL_COMMAND "")
ExternalProject_Get_Property(esplugin SOURCE_DIR)
set (ESPLUGIN_INCLUDE_DIRS "${SOURCE_DIR}/ffi/include")
@@ -105,7 +106,8 @@ ExternalProject_Add(libloadorder
URL "https://github.com/WrinklyNinja/libloadorder/archive/11.4.1.tar.gz"
CONFIGURE_COMMAND ""
BUILD_IN_SOURCE 1
BUILD_COMMAND cargo build --release --manifest-path ffi/Cargo.toml --features ffi-headers --target ${RUST_TARGET}
BUILD_COMMAND cargo build --release --manifest-path ffi/Cargo.toml --target ${RUST_TARGET} &&
cbindgen ffi/ -l c++ -o ffi/include/libloadorder.hpp
INSTALL_COMMAND "")
ExternalProject_Get_Property(libloadorder SOURCE_DIR)
set(LIBLOADORDER_INCLUDE_DIRS "${SOURCE_DIR}/ffi/include")
@@ -121,7 +123,8 @@ ExternalProject_Add(loot-condition-interpreter
URL "https://github.com/Ortham/loot-condition-interpreter/archive/1.0.0.tar.gz"
CONFIGURE_COMMAND ""
BUILD_IN_SOURCE 1
BUILD_COMMAND cargo build --release --manifest-path ffi/Cargo.toml --features ffi-headers --target ${RUST_TARGET}
BUILD_COMMAND cargo build --release --manifest-path ffi/Cargo.toml --target ${RUST_TARGET} &&
cbindgen ffi/ -l c++ -o ffi/include/loot_condition_interpreter.hpp
INSTALL_COMMAND "")
ExternalProject_Get_Property(loot-condition-interpreter SOURCE_DIR)
set (LCI_INCLUDE_DIRS "${SOURCE_DIR}/ffi/include")
+1
View File
@@ -22,6 +22,7 @@ install:
- rustup-init.exe -y
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- rustup target add i686-pc-windows-msvc
- where cbindgen || cargo install cbindgen --version 0.6.6
- choco install -y doxygen.portable
- python -m pip install -r docs/requirements.txt
- ps: (New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/WrinklyNinja/ci-scripts/2.0.0/delete_old_bintray_versions.py', "$env:APPVEYOR_BUILD_FOLDER\delete_old_bintray_versions.py")