Commit 23ab4ab1 authored by Jonathan Perkin's avatar Jonathan Perkin

Try to fix libmysqlclient symlinks on per-OS basis.

parent c6c992e1
......@@ -177,10 +177,18 @@ ENDIF()
IF(NOT DISABLE_SHARED)
MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS})
IF(UNIX)
# libtool compatability
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0")
ELSE()
SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0")
ENDIF()
# Name of shared library is mysqlclient on Unix
SET_TARGET_PROPERTIES(libmysql PROPERTIES
OUTPUT_NAME mysqlclient
VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0"
VERSION "${OS_SHARED_LIB_VERSION}"
SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
IF(LINK_FLAG_NO_UNDEFINED)
GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS)
......@@ -196,8 +204,7 @@ IF(NOT DISABLE_SHARED)
SET_TARGET_PROPERTIES(libmysql PROPERTIES CLEAN_DIRECT_OUTPUT 1)
# Install 3 links to libmysqlclient.so (client_r)
FOREACH(ver "" "${SHARED_LIB_MAJOR_VERSION}"
"${SHARED_LIB_MAJOR_VERSION}.0.0")
FOREACH(ver "" "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
GET_VERSIONED_LIBNAME(
"${CMAKE_SHARED_LIBRARY_PREFIX}mysqlclient_r"
"${CMAKE_SHARED_LIBRARY_SUFFIX}"
......
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