Enable specifying out-of-source platform configuration cmake file (#1941)
Resolve #1935, enable specifying out-of-source platform folder with `cmake .. -DWAMR_BUILD_PLATFORM=new-os -DSHARED_PLATFORM_CONFIG=/path/to/new-os/shared_platform.cmake`
This commit is contained in:
@ -19,6 +19,11 @@ endif ()
|
||||
if (NOT DEFINED DEPS_DIR)
|
||||
set (DEPS_DIR ${WAMR_ROOT_DIR}/core/deps)
|
||||
endif ()
|
||||
if (NOT DEFINED SHARED_PLATFORM_CONFIG)
|
||||
# CMake file for platform configuration. The PLATFORM_SHARED_SOURCE varable
|
||||
# should point to a list of platform-specfic source files to compile.
|
||||
set (SHARED_PLATFORM_CONFIG ${SHARED_DIR}/platform/${WAMR_BUILD_PLATFORM}/shared_platform.cmake)
|
||||
endif ()
|
||||
|
||||
if (DEFINED EXTRA_SDK_INCLUDE_PATH)
|
||||
message(STATUS, "EXTRA_SDK_INCLUDE_PATH = ${EXTRA_SDK_INCLUDE_PATH} ")
|
||||
@ -165,7 +170,7 @@ LIST (APPEND RUNTIME_LIB_HEADER_LIST ${header})
|
||||
|
||||
enable_language (ASM)
|
||||
|
||||
include (${SHARED_DIR}/platform/${WAMR_BUILD_PLATFORM}/shared_platform.cmake)
|
||||
include (${SHARED_PLATFORM_CONFIG})
|
||||
include (${SHARED_DIR}/mem-alloc/mem_alloc.cmake)
|
||||
include (${IWASM_DIR}/common/iwasm_common.cmake)
|
||||
include (${SHARED_DIR}/utils/shared_utils.cmake)
|
||||
|
||||
Reference in New Issue
Block a user