Commit f544b21f authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix build on OSX

- Workaround linker bug that prevents linking aria test executables
   using -fno-common on OSX
- Skip system readline detection (OSX readline is incompatible one)
- Make Xcode generator work
parent 9f010e32
......@@ -210,7 +210,10 @@ MACRO (MYSQL_CHECK_READLINE)
IF(WITH_READLINE)
MYSQL_USE_BUNDLED_READLINE()
ELSE()
# OSX includes incompatible readline lib
IF (NOT APPLE)
MYSQL_FIND_SYSTEM_READLINE()
ENDIF()
IF(NOT USE_NEW_READLINE_INTERFACE)
MYSQL_FIND_SYSTEM_LIBEDIT()
IF(NOT USE_LIBEDIT_INTERFACE)
......
......@@ -149,7 +149,9 @@ IF(UNIX)
SET(CMAKE_REQUIRED_LIBRARIES
${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT})
IF(CMAKE_REQUIRED_LIBRARIES)
LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)
ENDIF()
LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT})
OPTION(WITH_LIBWRAP "Compile with tcp wrappers support" OFF)
......
......@@ -27,7 +27,7 @@ TARGET_LINK_LIBRARIES(tests dbug)
ADD_EXECUTABLE(factorial my_main.c factorial.c)
TARGET_LINK_LIBRARIES(factorial dbug)
IF(NOT WIN32)
IF(NOT WIN32 AND NOT CMAKE_GENERATOR MATCHES Xcode)
FIND_PROGRAM(GROFF groff)
FIND_PROGRAM(NROFF nroff)
SET(OUTPUT_INC output1.r output2.r output3.r output4.r output5.r)
......@@ -63,5 +63,5 @@ IF(NOT WIN32)
ADD_CUSTOM_TARGET(t ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/user.t)
ENDIF(NROFF)
ENDIF(NOT WIN32)
ENDIF()
......@@ -41,6 +41,11 @@ SET(ARIA_SOURCES ma_init.c ma_open.c ma_extra.c ma_info.c ma_rkey.c
ma_norec.c
)
IF(APPLE)
# Workaround linker bug on OSX 10.7
ADD_DEFINITIONS(-fno-common)
ENDIF()
MYSQL_ADD_PLUGIN(aria ${ARIA_SOURCES}
STORAGE_ENGINE STATIC_ONLY DEFAULT
RECOMPILE_FOR_EMBEDDED)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment