Skip to content

Commit

Permalink
Fix No such file or directory: wasm_export.h
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffMboya committed Jan 9, 2025
1 parent 6cadf5f commit bfbc905
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions embed-proplet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,36 @@ cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(my_proplet)

add_subdirectory(src)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/modules/wamr/wasm-micro-runtime/core/iwasm/include

add_subdirectory(modules/wamr)
${CMAKE_CURRENT_SOURCE_DIR}/modules/wamr/wasm-micro-runtime/core/shared/mem-alloc
${CMAKE_CURRENT_SOURCE_DIR}/modules/wamr/wasm-micro-runtime/core/shared/utils

link_wamr_to_zephyr(app)
# If you need more subfolders (e.g. iwasm/libraries/libc-builtin), add them:
# ${CMAKE_CURRENT_SOURCE_DIR}/modules/wamr/wasm-micro-runtime/core/iwasm/libraries/libc-builtin
)

file(GLOB WAMR_CORE_IWASM_SRC
${CMAKE_CURRENT_SOURCE_DIR}/modules/wamr/wasm-micro-runtime/core/iwasm/common/*.c
${CMAKE_CURRENT_SOURCE_DIR}/modules/wamr/wasm-micro-runtime/core/iwasm/interpreter/*.c
# Add any other iwasm .c if needed (e.g. JIT, AoT, etc.)
)

file(GLOB WAMR_CORE_SHARED_SRC
${CMAKE_CURRENT_SOURCE_DIR}/modules/wamr/wasm-micro-runtime/core/shared/platform/zephyr/*.c
${CMAKE_CURRENT_SOURCE_DIR}/modules/wamr/wasm-micro-runtime/core/shared/mem-alloc/**/*.c
${CMAKE_CURRENT_SOURCE_DIR}/modules/wamr/wasm-micro-runtime/core/shared/utils/*.c
# Add any other "shared" sources required
)

target_sources(app PRIVATE
${WAMR_CORE_IWASM_SRC}
${WAMR_CORE_SHARED_SRC}
)

file(GLOB MY_APP_SRC
${CMAKE_CURRENT_SOURCE_DIR}/src/*.c
)
target_sources(app PRIVATE ${MY_APP_SRC})

0 comments on commit bfbc905

Please sign in to comment.