Skip to content

Commit 140e02d

Browse files
committed
build: dereference a variable when checking (NFC)
Some versions of CMake dereference the variable here and others do not. Explicitly dereference to ensure that the library name is properly set. Failure to do so will fail to load the library as the output path becomes the name.
1 parent 06fd9c4 commit 140e02d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1905,7 +1905,7 @@ function(add_swift_target_library name)
19051905
if(SWIFTLIB_SHARED)
19061906
if(sdk IN_LIST SWIFT_APPLE_PLATFORMS)
19071907
list(APPEND swiftlib_link_flags_all "-dynamiclib -Wl,-headerpad_max_install_names")
1908-
elseif(sdk STREQUAL ANDROID)
1908+
elseif(${sdk} STREQUAL ANDROID)
19091909
list(APPEND swiftlib_link_flags_all "-shared")
19101910
# TODO: Instead of `lib${name}.so` find variable or target property which already have this value.
19111911
list(APPEND swiftlib_link_flags_all "-Wl,-soname,lib${name}.so")

0 commit comments

Comments
 (0)