Skip to content

Commit

Permalink
Fix swift_target_link_search_directories issue appending just the las…
Browse files Browse the repository at this point in the history
…t directory.

STLD_FLAGS wasn't being appended, but replaced.
  • Loading branch information
gonzalolarralde committed Dec 26, 2016
1 parent b057252 commit e85e9e1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ endfunction()
function(swift_target_link_search_directories target directories)
set(STLD_FLAGS "")
foreach(directory ${directories})
set(STLD_FLAGS " ${CMAKE_LIBRARY_PATH_FLAG}${directory}")
set(STLD_FLAGS "${STLD_FLAGS} ${CMAKE_LIBRARY_PATH_FLAG}${directory}")
endforeach()
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS ${STLD_FLAGS})
endfunction()
Expand Down Expand Up @@ -1109,7 +1109,7 @@ function(_add_swift_library_single target name)
COMPILE_FLAGS " ${c_compile_flags}")
set_property(TARGET "${target}" APPEND_STRING PROPERTY
LINK_FLAGS " ${link_flags}")
swift_target_link_search_directories(${target} ${library_search_directories})
swift_target_link_search_directories("${target}" "${library_search_directories}")

# Adjust the linked libraries for windows targets. On Windows, the link is
# performed against the import library, and the runtime uses the dll. Not
Expand Down Expand Up @@ -1165,8 +1165,7 @@ function(_add_swift_library_single target name)
"${SWIFTSTATICLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}"
"${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${SWIFTLIB_SINGLE_SUBDIR}"
"${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_LIB_SUBDIR}")
swift_target_link_search_directories(${target_static}
${library_search_directories})
swift_target_link_search_directories("${target_static}" "${library_search_directories}")
target_link_libraries("${target_static}" PRIVATE
${SWIFTLIB_SINGLE_PRIVATE_LINK_LIBRARIES})
endif()
Expand Down

0 comments on commit e85e9e1

Please sign in to comment.