llext-edk: refact: do not mix code and function definitions
Prepare the current code so that functions come before actual code. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This commit is contained in:
parent
7fa1fb7181
commit
aa8a617c3b
1 changed files with 10 additions and 8 deletions
|
@ -30,14 +30,6 @@
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
|
||||||
if (CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID)
|
|
||||||
message(FATAL_ERROR
|
|
||||||
"The LLEXT EDK is not compatible with CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(llext_edk ${PROJECT_BINARY_DIR}/${llext_edk_name})
|
|
||||||
set(llext_edk_inc ${llext_edk}/include)
|
|
||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
# relative_dir(<dir> <relative_out> <bindir_out>)
|
# relative_dir(<dir> <relative_out> <bindir_out>)
|
||||||
#
|
#
|
||||||
|
@ -89,6 +81,16 @@ function(relative_dir dir relative_out bindir_out)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID)
|
||||||
|
message(FATAL_ERROR
|
||||||
|
"The LLEXT EDK is not compatible with CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(llext_edk ${PROJECT_BINARY_DIR}/${llext_edk_name})
|
||||||
|
set(llext_edk_inc ${llext_edk}/include)
|
||||||
|
|
||||||
string(REGEX REPLACE "[^a-zA-Z0-9]" "_" llext_edk_name_sane ${llext_edk_name})
|
string(REGEX REPLACE "[^a-zA-Z0-9]" "_" llext_edk_name_sane ${llext_edk_name})
|
||||||
string(TOUPPER ${llext_edk_name_sane} llext_edk_name_sane)
|
string(TOUPPER ${llext_edk_name_sane} llext_edk_name_sane)
|
||||||
set(install_dir_var "${llext_edk_name_sane}_INSTALL_DIR")
|
set(install_dir_var "${llext_edk_name_sane}_INSTALL_DIR")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue