Skip to content

Commit 4e0c472

Browse files
committed
Resolve dependent libraries for libedit/readline
When linking static libedit/readline to extension, dependencies should be also linked separately. For now this is not a relevant problem here. Also, currently listed dependent libraries are outdated.
1 parent f7aecbc commit 4e0c472

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

cmake/ext/readline/CMakeLists.txt

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -209,43 +209,3 @@ else()
209209
endif()
210210

211211
configure_file(cmake/config.h.in config.h)
212-
213-
# TODO: Editline/Readline dependent libraries shouldn't be linked on this level.
214-
# Recheck if this is really needed. Either move to find modules or remove it.
215-
# Also, for example, Editline with Autoconf integration has even more thorough
216-
# dependencies checked in current version.
217-
218-
#[[
219-
set(CURSES_NEED_NCURSES TRUE)
220-
find_package(Curses)
221-
set_package_properties(
222-
Curses
223-
PROPERTIES
224-
TYPE REQUIRED
225-
PURPOSE "Necessary to enable the readline extension."
226-
)
227-
228-
# The CMake's Curses find module, doesn't define IMPORTED target yet.
229-
if(CURSES_FOUND AND NOT TARGET Curses::Curses)
230-
add_library(Curses::Curses INTERFACE IMPORTED)
231-
232-
set_target_properties(
233-
Curses::Curses
234-
PROPERTIES
235-
INTERFACE_LINK_LIBRARIES "${CURSES_LIBRARIES}"
236-
INTERFACE_INCLUDE_DIRECTORIES "${CURSES_INCLUDE_DIRS}"
237-
INTERFACE_COMPILE_OPTIONS "${CURSES_CFLAGS}"
238-
)
239-
endif()
240-
241-
target_link_libraries(php_ext_readline PRIVATE Curses::Curses)
242-
243-
# TODO: Check for the obsolescent termcap library more properly.
244-
if(NOT CURSES_FOUND)
245-
check_library_exists(termcap, tgetent "" _have_termcap_library)
246-
247-
if(_have_termcap_library)
248-
target_link_libraries(php_ext_readline PRIVATE termcap)
249-
endif()
250-
endif()
251-
]]#

0 commit comments

Comments
 (0)