Repository: incubator-weex
Updated Branches:
  refs/heads/master 44733d48b -> 6ff51f015


* [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/6ff51f01
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/6ff51f01
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/6ff51f01

Branch: refs/heads/master
Commit: 6ff51f01550b8c415968dbfa45ffd07656411489
Parents: 44733d4
Author: zhongcang <[email protected]>
Authored: Fri May 25 11:14:22 2018 +0800
Committer: YorkShen <[email protected]>
Committed: Tue May 29 15:06:19 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/6ff51f01/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/6ff51f01/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 .)

Reply via email to