diff options
author | Vladislav Vaintroub <wlad@montyprogram.org> | 2012-02-02 21:48:22 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.org> | 2012-02-02 21:48:22 +0100 |
commit | 657e8675d8a6d56a7e797bc8b07da1feb836450b (patch) | |
tree | 92d995ccd466bd1de2f28f7f2ab7cf21f116cd64 /cmake/readline.cmake | |
parent | d8751d283c5648417973481c6ffd65292d10e20d (diff) | |
download | mariadb-git-657e8675d8a6d56a7e797bc8b07da1feb836450b.tar.gz |
Fix portability problems
- Solaris readline always needs curses
- -rdynamic is not portable, replaced by SET_TARGET_PROPERTIES(...ENABLE_EXPORTS)
Diffstat (limited to 'cmake/readline.cmake')
-rw-r--r-- | cmake/readline.cmake | 10 |
1 files changed, 6 insertions, 4 deletions
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 <stdio.h> #include <readline/readline.h> @@ -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() |