File tree 2 files changed +13
-3
lines changed
2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,14 @@ if(BUILD_SHARED_LIBS)
63
63
option (FOUNDATION_BUILD_TOOLS "build tools" ON )
64
64
endif ()
65
65
66
+ set (FOUNDATION_BUILD_NETWORKING_default ON )
67
+ if (CMAKE_SYSTEM_NAME STREQUAL WASI)
68
+ # Networking is not supported on WASI
69
+ set (FOUNDATION_BUILD_NETWORKING_default OFF )
70
+ endif ()
71
+ option (FOUNDATION_BUILD_NETWORKING "build FoundationNetworking"
72
+ ${FOUNDATION_BUILD_NETWORKING_default} )
73
+
66
74
set (CMAKE_POSITION_INDEPENDENT_CODE YES )
67
75
68
76
# Fetchable dependcies
@@ -121,7 +129,9 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL WASI)
121
129
endif ()
122
130
endif ()
123
131
find_package (LibXml2 REQUIRED)
124
- find_package (CURL REQUIRED)
132
+ if (FOUNDATION_BUILD_NETWORKING)
133
+ find_package (CURL REQUIRED)
134
+ endif ()
125
135
126
136
# Common build flags (_CFURLSessionInterface, _CFXMLInterface, CoreFoundation)
127
137
list (APPEND _Foundation_common_build_flags
Original file line number Diff line number Diff line change 14
14
15
15
add_subdirectory (CoreFoundation)
16
16
add_subdirectory (_CFXMLInterface)
17
- if (NOT CMAKE_SYSTEM_NAME STREQUAL "WASI" )
17
+ if (FOUNDATION_BUILD_NETWORKING )
18
18
add_subdirectory (_CFURLSessionInterface)
19
19
endif ()
20
20
add_subdirectory (Foundation)
21
21
add_subdirectory (FoundationXML)
22
- if (NOT CMAKE_SYSTEM_NAME STREQUAL "WASI" )
22
+ if (FOUNDATION_BUILD_NETWORKING )
23
23
add_subdirectory (FoundationNetworking)
24
24
endif ()
25
25
if (FOUNDATION_BUILD_TOOLS)
You can’t perform that action at this time.
0 commit comments