Explorar o código

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

Andy Li %!s(int64=7) %!d(string=hai) anos
pai
achega
b4ea79845b
Modificáronse 1 ficheiros con 12 adicións e 2 borrados
  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