Skip to content

Commit 9d9a5ce

Browse files
committed
build: add imported library for libedit
This allows us to use CMake more effectively rather than proliferating the linking and header search path logic.
1 parent 0c5f1ee commit 9d9a5ce

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
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)

0 commit comments

Comments
 (0)