mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-22 23:01:24 +08:00
32 lines
1.8 KiB
Diff
32 lines
1.8 KiB
Diff
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
index c29aa25..3106d77 100644
|
|
--- a/src/CMakeLists.txt
|
|
+++ b/src/CMakeLists.txt
|
|
@@ -1285,15 +1285,17 @@ if(MSVC)
|
|
set_target_properties(xerces-c PROPERTIES RUNTIME_OUTPUT_NAME "xerces-c_${INTERFACE_VERSION_U}")
|
|
set_target_properties(xerces-c PROPERTIES DEBUG_POSTFIX "D")
|
|
elseif(UNIX)
|
|
- # For strict libtool compatibility on Unix. It's a horrible hack to
|
|
- # 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)
|
|
+ # For strict libtool compatibility on Unix. It's a horrible hack to
|
|
+ # 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")
|
|
+ endif()
|
|
else()
|
|
# Not used for the common cases, though this would be the default if
|
|
# not for libtool compatibility.
|