Fix compilation error found in tflite test (#3820)
ps. https://github.com/bytecodealliance/wasm-micro-runtime/pull/3817
This commit is contained in:
@ -4,13 +4,21 @@
|
||||
include(FetchContent)
|
||||
|
||||
set(CJSON_SOURCE_DIR "${WAMR_ROOT_DIR}/core/deps/cjson")
|
||||
|
||||
FetchContent_Declare(
|
||||
cjson
|
||||
GIT_REPOSITORY https://github.com/DaveGamble/cJSON.git
|
||||
GIT_TAG v1.7.18
|
||||
SOURCE_DIR ${CJSON_SOURCE_DIR}
|
||||
)
|
||||
if(EXISTS ${CJSON_SOURCE_DIR})
|
||||
message("Use existed source code under ${CJSON_SOURCE_DIR}")
|
||||
FetchContent_Declare(
|
||||
cjson
|
||||
SOURCE_DIR ${CJSON_SOURCE_DIR}
|
||||
)
|
||||
else()
|
||||
message("download source code and store it at ${CJSON_SOURCE_DIR}")
|
||||
FetchContent_Declare(
|
||||
cjson
|
||||
GIT_REPOSITORY https://github.com/DaveGamble/cJSON.git
|
||||
GIT_TAG v1.7.18
|
||||
SOURCE_DIR ${CJSON_SOURCE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
set(ENABLE_CJSON_TEST OFF CACHE INTERNAL "Turn off tests")
|
||||
set(ENABLE_CJSON_UNINSTALL OFF CACHE INTERNAL "Turn off uninstall to avoid targets conflict")
|
||||
|
||||
Reference in New Issue
Block a user