diff options
author | Jonathan Perkin <jonathan.perkin@oracle.com> | 2010-04-26 13:32:54 +0200 |
---|---|---|
committer | Jonathan Perkin <jonathan.perkin@oracle.com> | 2010-04-26 13:32:54 +0200 |
commit | 23ab4ab1d011ae5a5652987631c354a796f09d34 (patch) | |
tree | 2cfea9cd159415f5a25ba9923c60e88af355f65f /libmysql | |
parent | c6c992e1cb817401f5a09fd7f6cf4eaebf448fab (diff) | |
download | mariadb-git-23ab4ab1d011ae5a5652987631c354a796f09d34.tar.gz |
Try to fix libmysqlclient symlinks on per-OS basis.
Diffstat (limited to 'libmysql')
-rwxr-xr-x | libmysql/CMakeLists.txt | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index 1193b9d7e27..0690211f981 100755 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -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}" |