mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
Removed cryptographically insecure sha1. This existed only for OPA compatibility. Also exclude bindings from main workspace Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
36 lines
998 B
CMake
36 lines
998 B
CMake
# Copyright (c) Microsoft
|
|
# Licensed under the MIT License.
|
|
|
|
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
|
|
include(FetchContent)
|
|
|
|
FetchContent_Declare(
|
|
Corrosion
|
|
GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git
|
|
# Use a tag that has a fix for https://github.com/corrosion-rs/corrosion/issues/590
|
|
GIT_TAG 6be991bb34c348dfb8344be22f3606288ea5c7fd
|
|
)
|
|
FetchContent_MakeAvailable(Corrosion)
|
|
|
|
project("regorus-test")
|
|
|
|
corrosion_import_crate(
|
|
# Path to <regorus-source-folder>/bindings/ffi/Cargo.toml
|
|
MANIFEST_PATH "../ffi/Cargo.toml"
|
|
# Always build regorus in Release mode.
|
|
PROFILE "release"
|
|
# Only build the "regorus-ffi" crate.
|
|
CRATES "regorus-ffi"
|
|
|
|
# Select specific features in regorus.
|
|
FEATURES "regorus/semver"
|
|
|
|
# Link statically
|
|
CRATE_TYPES "cdylib"
|
|
)
|
|
|
|
add_executable(regorus_test main.c)
|
|
# Add path to <regorus-source-folder>/bindings/ffi
|
|
target_include_directories(regorus_test PRIVATE "../ffi")
|
|
target_link_libraries(regorus_test regorus_ffi)
|