diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-03-17 19:56:22 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-03-17 19:56:22 +0100 |
commit | 78a965861a3300c321775c65f54dd541bc5d3d49 (patch) | |
tree | 2d7936920bf092e313f7acff9b9c014bc576da0e /libmysql | |
parent | 148c2c316df0dd2b6d29212d59d2339dedeaa272 (diff) | |
download | mariadb-git-78a965861a3300c321775c65f54dd541bc5d3d49.tar.gz |
Bug #52149 - packaging differences in CMake build
Corrected some packaging bugs:
- install mysqlservices library
- install libmysqlclient_r.so.{16,16.0.0} as links
to libmysqlclient.so
- install libmysqld-debug.a
- install my_safe_process, my_safe_kill and
symlinks to mysql-test-run.pl (mtr, mysql-test-run)
into correct place ${INSTALL_MYSQLTESTDIR}
Diffstat (limited to 'libmysql')
-rwxr-xr-x | libmysql/CMakeLists.txt | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index f9fc5355641..26af9c80a2b 100755 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -153,15 +153,26 @@ SET(LIBS clientlib dbug strings vio mysys ${ZLIB_LIBRARY} ${SSL_LIBRARIES}) # Merge several convenience libraries into one big mysqlclient # and link them together into shared library. MERGE_LIBRARIES(mysqlclient STATIC ${LIBS}) -IF(UNIX) - INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r mysqlclient ${INSTALL_LIBDIR}) -ENDIF() # Visual Studio users need debug static library for debug projects IF(MSVC) INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug) ENDIF() +IF(UNIX) + MACRO(GET_VERSIONED_LIBNAME LIBNAME EXTENSION VERSION OUTNAME) + SET(DOT_VERSION ".${VERSION}") + IF(DOT_VERSION STREQUAL ".") + SET(DOT_VERSION "") + ENDIF() + IF(APPLE) + SET(${OUTNAME} ${LIBNAME}${DOT_VERSION}${EXTENSION}) + ELSE() + SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION}) + ENDIF() + ENDMACRO() +ENDIF() + IF(NOT DISABLE_SHARED) MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS}) IF(UNIX) @@ -182,6 +193,16 @@ IF(NOT DISABLE_SHARED) #(mysqlclient in this case) SET_TARGET_PROPERTIES(mysqlclient PROPERTIES CLEAN_DIRECT_OUTPUT 1) SET_TARGET_PROPERTIES(libmysql PROPERTIES CLEAN_DIRECT_OUTPUT 1) - INSTALL_SYMLINK(${CMAKE_SHARED_LIBRARY_PREFIX}mysqlclient_r libmysql ${INSTALL_LIBDIR}) + + # 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}) + ENDFOREACH() ENDIF() ENDIF() |