@@ -50,6 +50,9 @@ vtune = get_option('vtune') == 'enabled'
5050
5151enable_libgomp = get_option (' libgomp' ) == ' enabled'
5252enable_tests = get_option (' tests' ) == ' enabled'
53+ force_sgx_tests = get_option (' force_sgx_tests' ) == ' enabled'
54+
55+ src_build = skeleton or direct or sgx
5356
5457cc = meson .get_compiler(' c' )
5558host_has_glibc = cc.get_define(' __GLIBC__' , prefix : ' #include <features.h>' ) != ''
@@ -230,19 +233,22 @@ endif
230233#
231234# Dependencies
232235#
236+ if src_build
237+ tomlc99_proj = subproject (' tomlc99-208203af46bdbdb29ba199660ed78d09c220b6c5' )
238+ tomlc99_dep = tomlc99_proj.get_variable (' tomlc99_dep' )
239+ tomlc99_src = tomlc99_proj.get_variable (' tomlc99_src' )
233240
234- tomlc99_proj = subproject (' tomlc99-208203af46bdbdb29ba199660ed78d09c220b6c5' )
235- tomlc99_dep = tomlc99_proj.get_variable (' tomlc99_dep' )
236- tomlc99_src = tomlc99_proj.get_variable (' tomlc99_src' )
237-
238- uthash_dep = subproject (' uthash-2.1.0' ).get_variable (' uthash_dep' )
241+ uthash_dep = subproject (' uthash-2.1.0' ).get_variable (' uthash_dep' )
242+ endif
239243
240244mbedtls_proj = subproject (' mbedtls-3.6.0' )
241245mbedtls_static_dep = mbedtls_proj.get_variable (' mbedtls_static_dep' )
242246mbedtls_pal_dep = mbedtls_proj.get_variable (' mbedtls_pal_dep' )
243247
244- curl_proj = subproject (' curl-8.8.0' )
245- cjson_proj = subproject (' cJSON-1.7.12' )
248+ if src_build
249+ curl_proj = subproject (' curl-8.8.0' )
250+ cjson_proj = subproject (' cJSON-1.7.12' )
251+ endif
246252
247253if sgx
248254 # XXX: do not call subproject() from under "if sgx" conditional, because it
@@ -288,16 +294,22 @@ endif
288294# The compilation
289295#
290296
291- subdir (' common' )
292- subdir (' pal' )
297+ if src_build
298+ subdir (' common' )
299+ subdir (' pal' )
300+ endif
293301subdir (' libos' )
294302subdir (' python' )
295- subdir (' tools' )
303+ if src_build
304+ subdir (' tools' )
305+ endif
296306
297- if get_option (' libc' ) == ' glibc'
298- subproject (' glibc-2.39-1' )
299- elif get_option (' libc' ) == ' musl'
300- subproject (' musl-1.2.4' )
307+ if src_build
308+ if get_option (' libc' ) == ' glibc'
309+ subproject (' glibc-2.39-1' )
310+ elif get_option (' libc' ) == ' musl'
311+ subproject (' musl-1.2.4' )
312+ endif
301313endif
302314
303315if enable_libgomp
0 commit comments