From 657e8675d8a6d56a7e797bc8b07da1feb836450b Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Thu, 2 Feb 2012 21:48:22 +0100 Subject: Fix portability problems - Solaris readline always needs curses - -rdynamic is not portable, replaced by SET_TARGET_PROPERTIES(...ENABLE_EXPORTS) --- cmake/readline.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cmake/readline.cmake') diff --git a/cmake/readline.cmake b/cmake/readline.cmake index 24a411e3f1d..49ab92f8bdb 100644 --- a/cmake/readline.cmake +++ b/cmake/readline.cmake @@ -116,7 +116,6 @@ MACRO (MYSQL_USE_BUNDLED_READLINE) SET(HAVE_HIST_ENTRY) SET(READLINE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/cmd-line-utils) SET(READLINE_LIBRARY readline) - FIND_CURSES() ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmd-line-utils/readline) ENDMACRO() @@ -126,10 +125,10 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE) FIND_LIBRARY(READLINE_LIBRARY NAMES readline) MARK_AS_ADVANCED(READLINE_INCLUDE_DIR READLINE_LIBRARY) - SET(CMAKE_REQUIRES_LIBRARIES ${READLINE_LIBRARY}) + SET(CMAKE_REQUIRES_LIBRARIES ${READLINE_LIBRARY} ${CURSES_LIBRARY}) IF(READLINE_LIBRARY AND READLINE_INCLUDE_DIR) - SET(CMAKE_REQUIRED_LIBRARIES ${READLINE_LIBRARY}) + SET(CMAKE_REQUIRED_LIBRARIES ${READLINE_LIBRARY} ${CURSES_LIBRARY}) CHECK_CXX_SOURCE_COMPILES(" #include #include @@ -175,6 +174,7 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE) ENDIF(READLINE_V5) ENDIF(NEW_READLINE_INTERFACE) ENDIF() + SET(CMAKE_REQUIRES_LIBRARIES ) ENDMACRO() MACRO (MYSQL_FIND_SYSTEM_LIBEDIT) @@ -197,6 +197,7 @@ MACRO (MYSQL_FIND_SYSTEM_LIBEDIT) LIBEDIT_INTERFACE) SET(USE_LIBEDIT_INTERFACE ${LIBEDIT_INTERFACE}) ENDIF() + SET(CMAKE_REQUIRES_LIBRARIES) ENDMACRO() @@ -204,6 +205,7 @@ MACRO (MYSQL_CHECK_READLINE) IF (NOT WIN32) MYSQL_CHECK_MULTIBYTE() SET(WITH_READLINE OFF CACHE BOOL "Use bundled readline") + FIND_CURSES() IF(WITH_READLINE) MYSQL_USE_BUNDLED_READLINE() @@ -217,7 +219,7 @@ MACRO (MYSQL_CHECK_READLINE) ENDIF() ENDIF() SET(MY_READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR}) - SET(MY_READLINE_LIBRARY ${READLINE_LIBRARY}) + SET(MY_READLINE_LIBRARY ${READLINE_LIBRARY} ${CURSES_LIBRARY}) ENDIF(NOT WIN32) ENDMACRO() -- cgit v1.2.1