[boost-modular-build-helper] Fixup mingw lib names (#20576)

* Fixup mingw lib names on windows

* Update versions

* Bump boost-modular-build-helper port-version.

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
Kai Pastor 2021-10-12 20:27:43 +02:00 committed by GitHub
parent 677eae74c0
commit 5fb4257c3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 3 deletions

View File

@ -130,6 +130,20 @@ function(boost_modular_build)
file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME})
endif()
endforeach()
# Similar for mingw
file(GLOB INSTALLED_LIBS "${CURRENT_PACKAGES_DIR}/debug/lib/*-mgw10-*.a" "${CURRENT_PACKAGES_DIR}/lib/*-mgw10-*.a")
foreach(LIB IN LISTS INSTALLED_LIBS)
get_filename_component(OLD_FILENAME "${LIB}" NAME)
get_filename_component(DIRECTORY_OF_LIB_FILE "${LIB}" DIRECTORY)
string(REGEX REPLACE "-mgw[0-9]+-.*[0-9](\\.dll\\.a|\\.a)$" "\\1" NEW_FILENAME "${OLD_FILENAME}")
if("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}")
# nothing to do
elseif(EXISTS "${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}")
file(REMOVE "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}")
else()
file(RENAME "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}" "${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}")
endif()
endforeach()
# boost-regex[icu] and boost-locale[icu] generate has_icu.lib
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/has_icu.lib")

View File

@ -1,7 +1,7 @@
{
"name": "boost-modular-build-helper",
"version": "1.77.0",
"port-version": 1,
"port-version": 2,
"description": "Internal vcpkg port used to build Boost libraries",
"dependencies": [
"boost-uninstall"

View File

@ -28,7 +28,7 @@ $portVersions = @{
"boost-config" = 2;
"boost-gil" = 1;
"boost-iostreams" = 1;
"boost-modular-build-helper" = 1;
"boost-modular-build-helper" = 2;
"boost-odeint" = 1;
"boost-python" = 1;
"boost-process" = 2;

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9795fd3f465461fea28201a773909b6fd0e3400b",
"version": "1.77.0",
"port-version": 2
},
{
"git-tree": "c076291c3d44f7cea167e469748ead6270e1c424",
"version": "1.77.0",

View File

@ -810,7 +810,7 @@
},
"boost-modular-build-helper": {
"baseline": "1.77.0",
"port-version": 1
"port-version": 2
},
"boost-move": {
"baseline": "1.77.0",