From 02f6b897753e7370f09193805a947e928ef4a1ab Mon Sep 17 00:00:00 2001 From: Long Nguyen Date: Wed, 2 Dec 2020 05:13:58 +0700 Subject: [many ports] mingw support (#14556) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [vcpkg_configure_make] Only rename import libs on MSVC * [x264] Only rename import libs on MSVC * [x265] Add libc++ and libstdc++ as system libs * [ffmpeg] mingw support * [libvpx] Set AS environment variable * [vcpkg_common_definition] Fix a mistake in the prefix and suffix variables * [vcpkg_configure_make] Strip leading -l from lib list before joining * [mp3lame] Use vcpkg_configure_make + mingw support * [x265] Escape the pluses * [ffmpeg] Add compiler flags for mingw * [ffmpeg] Add WINVER define in mf_utils.c * [ffmpeg] Remove unnecessary patch in 0003-fic-windowsinclude.patch * [mp3lame] Add missing dollar sign Co-authored-by: Matthias C. M. Troffaes * [x265] Remove static lib when building shared with mingw * [libogg] Change library name to libogg on mingw * [libogg] Bump port version * [x265] Remove -l(std)c++ flag in pkgconfig file * [vcpkg_configure_make] Try to fix huge diff * [mp3lame] Add comment on deprecated function lame_init_old Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Matthias C. M. Troffaes Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> --- scripts/cmake/vcpkg_common_definitions.cmake | 4 ++-- scripts/cmake/vcpkg_configure_make.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_common_definitions.cmake b/scripts/cmake/vcpkg_common_definitions.cmake index 10e5338d0..f63d6467a 100644 --- a/scripts/cmake/vcpkg_common_definitions.cmake +++ b/scripts/cmake/vcpkg_common_definitions.cmake @@ -124,10 +124,10 @@ endif() #This allows us scale down on hardcoded target dependent paths in portfiles set(CMAKE_STATIC_LIBRARY_SUFFIX "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}") set(CMAKE_SHARED_LIBRARY_SUFFIX "${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") -set(CMAKE_IMPORT_LIBRARY_SUFFIX "${VCPKG_TARGET_IMPORT_LIBRARY_PREFIX}") +set(CMAKE_IMPORT_LIBRARY_SUFFIX "${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}") set(CMAKE_STATIC_LIBRARY_PREFIX "${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}") set(CMAKE_SHARED_LIBRARY_PREFIX "${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}") -set(CMAKE_IMPORT_LIBRARY_PREFIX "${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}") +set(CMAKE_IMPORT_LIBRARY_PREFIX "${VCPKG_TARGET_IMPORT_LIBRARY_PREFIX}") set(CMAKE_FIND_LIBRARY_SUFFIXES "${VCPKG_FIND_LIBRARY_SUFFIXES}" CACHE INTERNAL "") # Required by find_library set(CMAKE_FIND_LIBRARY_PREFIXES "${VCPKG_FIND_LIBRARY_PREFIXES}" CACHE INTERNAL "") # Required by find_library diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 8a7b27be8..e7af4713c 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -484,7 +484,6 @@ function(vcpkg_configure_make) set(ALL_LIBS_LIST ${C_LIBS_LIST} ${CXX_LIBS_LIST}) list(REMOVE_DUPLICATES ALL_LIBS_LIST) list(TRANSFORM ALL_LIBS_LIST STRIP) - #Do lib list transformation from name.lib to -lname if necessary set(_VCPKG_TRANSFORM_LIBS TRUE) if(VCPKG_TARGET_IS_UWP) @@ -501,6 +500,7 @@ function(vcpkg_configure_make) if(VCPKG_TARGET_IS_WINDOWS) list(REMOVE_ITEM ALL_LIBS_LIST "uuid") endif() + list(TRANSFORM ALL_LIBS_LIST REPLACE "^(${_lprefix})" "") endif() list(JOIN ALL_LIBS_LIST " ${_lprefix}" ALL_LIBS_STRING) @@ -681,7 +681,7 @@ function(vcpkg_configure_make) WORKING_DIRECTORY "${TAR_DIR}" LOGNAME config-${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}} ) - if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(GLOB_RECURSE LIBTOOL_FILES "${TAR_DIR}*/libtool") foreach(lt_file IN LISTS LIBTOOL_FILES) file(READ "${lt_file}" _contents) -- cgit v1.2.3