[vcpkg/scripts/make] avoid versioning for android (#17089)

This commit is contained in:
huangqinjin 2021-07-27 01:53:47 +08:00 committed by GitHub
parent d781bd9ca7
commit 56a33d86b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -772,6 +772,14 @@ function(vcpkg_configure_make)
set(ENV{CXXFLAGS} "${CXXFLAGS_${_buildtype}}")
set(ENV{RCFLAGS} "${VCPKG_DETECTED_CMAKE_RC_FLAGS_${_buildtype}}")
set(ENV{LDFLAGS} "${LDFLAGS_${_buildtype}}")
# https://www.gnu.org/software/libtool/manual/html_node/Link-mode.html
# -avoid-version is handled specially by libtool link mode, this flag is not forwarded to linker,
# and libtool tries to avoid versioning for shared libraries and no symbolic links are created.
if(VCPKG_TARGET_IS_ANDROID)
set(ENV{LDFLAGS} "-avoid-version $ENV{LDFLAGS}")
endif()
if(LINK_ENV_${_VAR_SUFFIX})
set(_LINK_CONFIG_BACKUP "$ENV{_LINK_}")
set(ENV{_LINK_} "${LINK_ENV_${_VAR_SUFFIX}}")