This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit caefd0de9f311fcc9d57942e21a351b7fd5391cf Author: George Poulios <gpoul...@census-labs.com> AuthorDate: Sat Aug 2 09:39:13 2025 +0300 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 <gpoul...@census-labs.com> --- CMakeLists.txt | 1 + examples/optee_gp/CMakeLists.txt | 4 +++- tee/libteec/CMakeLists.txt | 22 ++++++++++++++++------ tee/libteec/Make.defs | 2 +- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8641d690b..84844e700 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/examples/optee_gp/CMakeLists.txt b/examples/optee_gp/CMakeLists.txt index 3e4d16f87..4840c7d7e 100644 --- a/examples/optee_gp/CMakeLists.txt +++ b/examples/optee_gp/CMakeLists.txt @@ -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() diff --git a/tee/libteec/CMakeLists.txt b/tee/libteec/CMakeLists.txt index f94bb4b48..9fa59587b 100644 --- a/tee/libteec/CMakeLists.txt +++ b/tee/libteec/CMakeLists.txt @@ -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() diff --git a/tee/libteec/Make.defs b/tee/libteec/Make.defs index 5ac2332e6..2947d677b 100644 --- a/tee/libteec/Make.defs +++ b/tee/libteec/Make.defs @@ -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