瀏覽代碼

only include sys_android.c/sys_ios.m in the appropriate platforms

Andy Li 7 年之前
父節點
當前提交
b4ea79845b
共有 1 個文件被更改,包括 12 次插入2 次删除
  1. 12 2
      CMakeLists.txt

+ 12 - 2
CMakeLists.txt

@@ -60,14 +60,24 @@ file(GLOB std_srcs
     src/std/socket.c
     src/std/string.c
     src/std/sys.c
-    src/std/sys_android.c
-    src/std/sys_ios.m
     src/std/types.c
     src/std/ucs2.c
     src/std/thread.c
     src/std/process.c
 )
 
+if (ANDROID)
+    list(APPEND std_srcs
+        src/std/sys_android.c
+    )
+endif()
+
+if (IOS_PLATFORM)
+    list(APPEND std_srcs
+        src/std/sys_ios.m
+    )
+endif()
+
 add_library(libhl SHARED
     ${pcre_srcs}
     src/alloc.c