Repository: incubator-weex Updated Branches: refs/heads/master 44733d48b -> 729b147c4
* [core] wson build Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/110934ca Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/110934ca Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/110934ca Branch: refs/heads/master Commit: 110934cae95c2f01b13116fe8d638c2ef942b728 Parents: 8838d6c Author: zhongcang <qh438406...@gmail.com> Authored: Fri May 25 11:14:22 2018 +0800 Committer: zhongcang <qh438406...@gmail.com> Committed: Fri May 25 11:23:34 2018 +0800 ---------------------------------------------------------------------- weex_core/Source/CMakeLists.txt | 18 ++++++++---------- weex_core/Source/wson/CMakeLists.txt | 11 +++++++++++ 2 files changed, 19 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/110934ca/weex_core/Source/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/weex_core/Source/CMakeLists.txt b/weex_core/Source/CMakeLists.txt index 53d70e5..314b329 100644 --- a/weex_core/Source/CMakeLists.txt +++ b/weex_core/Source/CMakeLists.txt @@ -14,12 +14,6 @@ add_definitions(-DLAYOUT_LOG=0) add_definitions(-DJSAPI_LOG=0) add_definitions(-DDOM_PARSER_LOG=0) -## add_subdirectory for subdirectory has a CMakeLists.txt -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/IPC) - -## include_directories for include head file -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/IPC) - set(COMMON_SRCS ./core/api/WeexJSCoreApi.cpp @@ -50,10 +44,14 @@ set(COMMON_SRCS ) if (ANDROID) + ## add_subdirectory for subdirectory has a CMakeLists.txt + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/IPC) + ## include_directories for include head file + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/IPC) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/wson) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/wson) + set (ANDROID_SRCS - ./wson/wson.c - ./wson/wson_util.cpp - ./wson/wson_parser.cpp ./android/jniprebuild/jni_load.cc ./android/base/jni/android_jni.cpp ./android/base/jni/scoped_java_ref.cpp @@ -86,5 +84,5 @@ if (ANDROID) target_include_directories(${WEEXCORE_LIBRARY_NAME} PUBLIC .) - target_link_libraries(${WEEXCORE_LIBRARY_NAME} android weexipc log z) + target_link_libraries(${WEEXCORE_LIBRARY_NAME} wson android weexipc log z) endif (ANDROID) http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/110934ca/weex_core/Source/wson/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/weex_core/Source/wson/CMakeLists.txt b/weex_core/Source/wson/CMakeLists.txt new file mode 100644 index 0000000..a331a39 --- /dev/null +++ b/weex_core/Source/wson/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.4.1) + +set(WSON_LIBRARY_NAME wson) + +add_library(${WSON_LIBRARY_NAME} STATIC + ./wson.c + ./wson_util.cpp + ./wson_parser.cpp +) + +target_include_directories(${WSON_LIBRARY_NAME} PUBLIC .)