You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build: allow configuration of the system header location
Rather than hardcoding the paths to /usr/include, allow the user to set
the path to their libc headers. This is particularly important for
environments which may not use the traditional layout (e.g. exherbo) or
for builds which wish to build against an out-of-tree, non-system
installed libc for a Unix target which does not match the host system
(i.e. foreign cross-compilation).
@@ -200,6 +204,9 @@ macro(configure_sdk_unix name architectures)
200
204
201
205
foreach(arch${architectures})
202
206
if("${prefix}"STREQUAL"ANDROID")
207
+
set(SWIFT_SDK_ANDROID_ARCH_${arch}_LIBC_INCLUDE_DIRECTORY"${SWIFT_ANDROID_NDK_PATH}/sysroot/usr/include"CACHESTRING"Path to C library headers")
208
+
set(SWIFT_SDK_ANDROID_ARCH_${arch}_LIBC_ARCHITECTURE_INCLUDE_DIRECTORY"${SWIFT_ANDROID_NDK_PATH}/sysroot/usr/include"CACHESTRING"Path to C library architecture headers")
@@ -248,6 +255,13 @@ macro(configure_sdk_unix name architectures)
248
255
if(NOTSWIFT_SDK_${prefix}_ARCH_${arch}_PATH)
249
256
set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH"/")
250
257
endif()
258
+
if("${prefix}"STREQUAL"HAIKU")
259
+
set(SWIFT_SDK_HAIKU_ARCH_${arch}_LIBC_INCLUDE_DIRECTORY"/system/develop/headers/posix"CACHESTRING"Path to C library headers")
260
+
set(SWIFT_SDK_HAIKU_ARCH_${arch}_LIBC_ARCHITECTURE_INCLUDE_DIRECTORY"/system/develop/headers"CACHESTRING"Path to C library architecture headers")
261
+
else()
262
+
set(SWIFT_SDK_${prefix}_ARCH_${arch}_LIBC_INCLUDE_DIRECTORY"/usr/include"CACHESTRING"Path to C library headers")
263
+
set(SWIFT_SDK_${prefix}_ARCH_${arch}_LIBC_ARCHITECTURE_INCLUDE_DIRECTORY"${SWIFT_SDK_${prefix}_ARCH_${arch}_LIBC_INCLUDE_DIRECTORY}/${CMAKE_LIBRARY_ARCHITECTURE}"CACHESTRING"Path to C library architecture headers")
0 commit comments