This repository has been archived on 2023-11-05. You can view files and clone it, but cannot push or open issues or pull requests.
wasm-micro-runtime/core/iwasm/libraries/lib-rats/lib_rats.cmake
Zeuson 656a8427e6
linux-sgx: Improve the remote attestation (#1695)
The current implementation of remote attestation does not take into
account the integrity of the wasm module. The SHA256 of the wasm
module has been put into user_data to generate the quote, and more
parameters are exposed for further verification.
2022-11-22 14:45:03 +08:00

43 lines
1.2 KiB
CMake
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Copyright (c) 2022 Intel Corporation
# Copyright (c) 2020-2021 Alibaba Cloud
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
set (LIB_RATS_DIR ${CMAKE_CURRENT_LIST_DIR})
if ("$ENV{SGX_SSL_DIR}" STREQUAL "")
set (SGX_SSL_DIR "/opt/intel/sgxssl")
else()
set (SGX_SSL_DIR $ENV{SGX_SSL_DIR})
endif()
if (NOT EXISTS ${SGX_SSL_DIR})
message(FATAL_ERROR "Can not find SGX_SSL, please install it first")
endif()
add_definitions (-DWASM_ENABLE_LIB_RATS=1)
include_directories(${LIB_RATS_DIR} ${SGX_SSL_DIR}/include)
include(FetchContent)
set(RATS_BUILD_MODE "sgx"
CACHE INTERNAL "Select build mode for librats(host|occlum|sgxwasm)")
set(RATS_INSTALL_PATH "${CMAKE_BINARY_DIR}/librats" CACHE INTERNAL "")
FetchContent_Declare(
librats
GIT_REPOSITORY https://github.com/inclavare-containers/librats
GIT_TAG master
)
FetchContent_GetProperties(librats)
if (NOT librats_POPULATED)
message("-- Fetching librats ..")
FetchContent_Populate(librats)
include_directories("${librats_SOURCE_DIR}/include")
add_subdirectory(${librats_SOURCE_DIR} ${librats_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
file (GLOB source_all ${LIB_RATS_DIR}/*.c)
set (LIB_RATS_SOURCE ${source_all})