File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1261,9 +1261,11 @@ function(_add_swift_library_single target name)
12611261 "${SWIFT_NATIVE_SWIFT_TOOLS_PATH} /../lib/swift/${SWIFTLIB_SINGLE_SUBDIR} "
12621262 "${SWIFT_NATIVE_SWIFT_TOOLS_PATH} /../lib/swift/${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK} _LIB_SUBDIR}" )
12631263
1264- # There are scenarios in which this function is called with SDKROOT set
1265- # In those we need to ensure we link against the dylibs present in the SDK
1266- if (DEFINED ENV{SDKROOT})
1264+ # In certain cases when building, the environment variable SDKROOT is set to override
1265+ # where the sdk root is located in the system. If that environment variable has been
1266+ # set by the user, respect it and add the specified SDKROOT directory to the
1267+ # library_search_directories so we are able to link against those libraries
1268+ if (DEFINED ENV{SDKROOT} AND EXISTS "$ENV{SDKROOT} /usr/lib/swift" )
12671269 list (APPEND library_search_directories "$ENV{SDKROOT} /usr/lib/swift" )
12681270 endif ()
12691271
You can’t perform that action at this time.
0 commit comments