mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-14 19:08:19 +08:00
tee/libteec, examples/optee_gp: Fix cmake build
Top level: - 'tee' subdirectory added to top-level CMakeLists.txt tee/libteec: - BINARY_PREFIX defined PUBLIC to make it accessible to consumer apps - added missing DEBUGLEVEL definitions examples/optee_gp: - added missing dependency to libteec Signed-off-by: George Poulios <gpoulios@census-labs.com>
This commit is contained in:

committed by
Alan C. Assis

parent
3ee6fdaf99
commit
caefd0de9f
@@ -66,6 +66,7 @@ add_subdirectory(nshlib)
|
||||
add_subdirectory(platform)
|
||||
add_subdirectory(sdr)
|
||||
add_subdirectory(system)
|
||||
add_subdirectory(tee)
|
||||
add_subdirectory(testing)
|
||||
add_subdirectory(videoutils)
|
||||
add_subdirectory(wireless)
|
||||
|
@@ -29,5 +29,7 @@ if(CONFIG_EXAMPLES_OPTEE_GP)
|
||||
STACKSIZE
|
||||
${CONFIG_EXAMPLES_OPTEE_GP_STACKSIZE}
|
||||
PRIORITY
|
||||
${CONFIG_EXAMPLES_OPTEE_GP_PRIORITY})
|
||||
${CONFIG_EXAMPLES_OPTEE_GP_PRIORITY}
|
||||
DEPENDS
|
||||
libteec)
|
||||
endif()
|
||||
|
@@ -24,14 +24,13 @@ if(CONFIG_LIBTEEC)
|
||||
set(OPTEE_CLIENT_DIR ${CMAKE_CURRENT_LIST_DIR}/optee_client)
|
||||
|
||||
if(NOT EXISTS ${OPTEE_CLIENT_DIR})
|
||||
set(OPTEE_CLIENT_URL https://github.com/OP-TEE/optee_client/archive/refs/tags)
|
||||
set(OPTEE_CLIENT_URL
|
||||
https://github.com/OP-TEE/optee_client/archive/refs/tags)
|
||||
set(OPTEE_CLIENT_VER ${CONFIG_LIBTEEC_VERSION})
|
||||
FetchContent_Declare(
|
||||
optee_client_fetch
|
||||
URL ${OPTEE_CLIENT_URL}/${OPTEE_CLIENT_VER}.zip
|
||||
SOURCE_DIR
|
||||
${OPTEE_CLIENT_DIR}
|
||||
BINARY_DIR
|
||||
URL ${OPTEE_CLIENT_URL}/${OPTEE_CLIENT_VER}.zip SOURCE_DIR
|
||||
${OPTEE_CLIENT_DIR} BINARY_DIR
|
||||
${CMAKE_BINARY_DIR}/tee/libteec/optee_client
|
||||
PATCH_COMMAND patch -p1 -d ${OPTEE_CLIENT_DIR} <
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001-libteec-NuttX.patch
|
||||
@@ -56,6 +55,17 @@ if(CONFIG_LIBTEEC)
|
||||
optee_client/libteec/src/teec_trace.c)
|
||||
target_include_directories(libteec
|
||||
PRIVATE ${OPTEE_CLIENT_DIR}/libteec/include)
|
||||
target_compile_definitions(libteec PRIVATE BINARY_PREFIX=\"TEEC\")
|
||||
target_compile_definitions(libteec PUBLIC BINARY_PREFIX=\"TEEC\")
|
||||
|
||||
if(CONFIG_DEBUG_INFO)
|
||||
target_compile_definitions(libteec PUBLIC DEBUGLEVEL=3)
|
||||
elseif(CONFIG_DEBUG_WARN)
|
||||
target_compile_definitions(libteec PUBLIC DEBUGLEVEL=2)
|
||||
elseif(CONFIG_DEBUG_ERROR)
|
||||
target_compile_definitions(libteec PUBLIC DEBUGLEVEL=1)
|
||||
else()
|
||||
# the default DEBUGLEVEL is 1 (with error level)
|
||||
target_compile_definitions(libteec PUBLIC DEBUGLEVEL=1)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
@@ -32,7 +32,7 @@ else ifneq ($(CONFIG_DEBUG_WARN),)
|
||||
else ifneq ($(CONFIG_DEBUG_ERROR),)
|
||||
FLAGS += ${DEFINE_PREFIX}DEBUGLEVEL=1
|
||||
else
|
||||
# the default DEBUGLEVEL are 1(with error level)
|
||||
# the default DEBUGLEVEL is 1 (with error level)
|
||||
FLAGS += ${DEFINE_PREFIX}DEBUGLEVEL=1
|
||||
endif
|
||||
|
||||
|
Reference in New Issue
Block a user