diff options
author | Daniel Fischer <df@sun.com> | 2010-04-30 13:36:57 +0200 |
---|---|---|
committer | Daniel Fischer <df@sun.com> | 2010-04-30 13:36:57 +0200 |
commit | 463a60ece60138c3cfdef6256de5dcb01984b3c6 (patch) | |
tree | 1ee83beaa0edf053b07119acb0d33264f9f3ec33 /libmysql/CMakeLists.txt | |
parent | 2b588155e484a7d203988f8144da6bc160e80a1d (diff) | |
parent | 2087a2e8d7db925311dc432ea08bbaccf2dcd646 (diff) | |
download | mariadb-git-463a60ece60138c3cfdef6256de5dcb01984b3c6.tar.gz |
merge
Diffstat (limited to 'libmysql/CMakeLists.txt')
-rwxr-xr-x | libmysql/CMakeLists.txt | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index f207d3909f7..cf0f8f8ebde 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} COMPONENT SharedLibraries) 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) @@ -195,15 +203,22 @@ IF(NOT DISABLE_SHARED) SET_TARGET_PROPERTIES(mysqlclient PROPERTIES CLEAN_DIRECT_OUTPUT 1) 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") - GET_VERSIONED_LIBNAME( - "${CMAKE_SHARED_LIBRARY_PREFIX}mysqlclient_r" - "${CMAKE_SHARED_LIBRARY_SUFFIX}" - "${ver}" - linkname) - INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} COMPONENT SharedLibraries) + # Install links to libmysqlclient.so (client_r) + GET_VERSIONED_LIBNAME( + "${CMAKE_SHARED_LIBRARY_PREFIX}mysqlclient_r" + "${CMAKE_SHARED_LIBRARY_SUFFIX}" + "" + linkname) + INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR}) + SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}") + LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS) + FOREACH(ver ${OS_SHARED_LIB_SYMLINKS}) + GET_VERSIONED_LIBNAME( + "${CMAKE_SHARED_LIBRARY_PREFIX}mysqlclient_r" + "${CMAKE_SHARED_LIBRARY_SUFFIX}" + "${ver}" + linkname) + INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR}) ENDFOREACH() ENDIF() ENDIF() |