This is an automated email from the ASF dual-hosted git repository. rleigh pushed a commit to branch xerces-3.2 in repository https://gitbox.apache.org/repos/asf/xerces-c.git
The following commit(s) were added to refs/heads/xerces-3.2 by this push: new 44a039f cmake: Correct shared library name and symlink creation new 575717d Merge pull request #10 from rleigh-codelibre/cmake-libname-fixes-3.2 44a039f is described below commit 44a039f61e1a27ecd5bfb45007fc9cbb0c2acfc9 Author: Roger Leigh <rle...@codelibre.net> AuthorDate: Thu Apr 2 13:21:06 2020 +0100 cmake: Correct shared library name and symlink creation --- src/CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c29aa25..344851f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1289,11 +1289,13 @@ elseif(UNIX) # set the version in the filename, and create the symlink at install # time. Note: could be dropped when the SONAME is updated and # libtool compatibility is no longer required. - set_target_properties(xerces-c PROPERTIES OUTPUT_NAME "xerces-c-${INTERFACE_VERSION_D}") - file(GENERATE - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake" - CONTENT "execute_process(COMMAND ln -sf \"$<TARGET_FILE_NAME:xerces-c>\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/libxerces-c.so\")") - install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake") + if(BUILD_SHARED_LIBS) + set_target_properties(xerces-c PROPERTIES OUTPUT_NAME "xerces-c-${INTERFACE_VERSION_D}") + file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake" + CONTENT "execute_process(COMMAND ln -sf \"$<TARGET_FILE_NAME:xerces-c>\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/libxerces-c${CMAKE_SHARED_LIBRARY_SUFFIX}\")") + install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake") + endif() else() # Not used for the common cases, though this would be the default if # not for libtool compatibility. --------------------------------------------------------------------- To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org