Skip to content

Commit 07ea64b

Browse files
authored
Merge pull request #29404 from compnerd/edit-your-patterns
build: add imported library for libedit
2 parents a40e699 + 04affa2 commit 07ea64b

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

cmake/modules/FindLibEdit.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ else()
5959
LibEdit_LIBRARIES
6060
VERSION_VAR
6161
LibEdit_VERSION_STRING)
62-
mark_as_advanced(LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES)
6362
endif()
6463

64+
if(LibEdit_FOUND AND NOT TARGET libedit)
65+
add_library(libedit UNKNOWN IMPORTED)
66+
set_target_properties(libedit PROPERTIES
67+
IMPORTED_LOCATION ${LibEdit_LIBRARIES}
68+
INTERFACE_INCLUDE_DIRECTORIES ${LibEdit_INCLUDE_DIRS})
69+
endif()
70+
mark_as_advanced(LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES)

lib/Immediate/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ if(LibEdit_FOUND AND LibEdit_HAS_UNICODE)
1616
target_compile_definitions(swiftImmediate PRIVATE
1717
HAVE_LIBEDIT)
1818
target_link_libraries(swiftImmediate PRIVATE
19-
${LibEdit_LIBRARIES})
19+
libedit)
2020
endif()

tools/SourceKit/tools/sourcekitd-repl/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
1212
dispatch
1313
BlocksRuntime)
1414
endif()
15-
target_include_directories(sourcekitd-repl PRIVATE
16-
${LibEdit_INCLUDE_DIRS})
1715
target_link_libraries(sourcekitd-repl PRIVATE
18-
${LibEdit_LIBRARIES})
16+
libedit)
1917

2018
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
2119
set_target_properties(sourcekitd-repl

0 commit comments

Comments
 (0)