Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
044286f
[vcpkg_configure_make] Only rename import libs on MSVC
longnguyen2004 Nov 11, 2020
3ee8976
[x264] Only rename import libs on MSVC
longnguyen2004 Nov 11, 2020
f36fbf8
[x265] Add libc++ and libstdc++ as system libs
longnguyen2004 Nov 11, 2020
815d6e0
[ffmpeg] mingw support
longnguyen2004 Nov 11, 2020
10e0cf3
[libvpx] Set AS environment variable
longnguyen2004 Nov 12, 2020
87cdd0d
[vcpkg_common_definition] Fix a mistake in the prefix and suffix vari…
longnguyen2004 Nov 12, 2020
4b72e4d
[vcpkg_configure_make] Strip leading -l from lib list before joining
longnguyen2004 Nov 12, 2020
ff2e5cf
[mp3lame] Use vcpkg_configure_make + mingw support
longnguyen2004 Nov 12, 2020
e7d45b0
[x265] Escape the pluses
longnguyen2004 Nov 12, 2020
10c7e65
[ffmpeg] Add compiler flags for mingw
longnguyen2004 Nov 12, 2020
7eaa145
[ffmpeg] Add WINVER define in mf_utils.c
longnguyen2004 Nov 13, 2020
e8c7ef2
[ffmpeg] Remove unnecessary patch in 0003-fic-windowsinclude.patch
longnguyen2004 Nov 13, 2020
e7995d9
[mp3lame] Add missing dollar sign
longnguyen2004 Nov 13, 2020
619d08a
Merge branch 'mingw-ffmpeg-related' of https://github.com/longnguyen2…
longnguyen2004 Nov 13, 2020
47fb16c
[x265] Remove static lib when building shared with mingw
longnguyen2004 Nov 14, 2020
38b0101
[libogg] Change library name to libogg on mingw
longnguyen2004 Nov 14, 2020
6252905
[libogg] Bump port version
longnguyen2004 Nov 16, 2020
cd9ed37
Merge branch 'master' into mingw-ffmpeg-related
longnguyen2004 Nov 18, 2020
8b0d8a4
[x265] Remove -l(std)c++ flag in pkgconfig file
longnguyen2004 Nov 20, 2020
a74fd38
[vcpkg_configure_make] Try to fix huge diff
longnguyen2004 Nov 24, 2020
4c647c8
[mp3lame] Add comment on deprecated function lame_init_old
longnguyen2004 Nov 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions ports/ffmpeg/0003-fix-windowsinclude.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,3 @@ index 9cfbc45..e3447e6 100644
#include <windows.h>
#endif

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 01f0410..dbb0736 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -23,6 +23,10 @@
* multimedia converter based on the FFmpeg libraries
*/

+#define _WIN32_WINNT 0x0502 // Must be less than 0x0600, because otherwise WinSock2.h defines "pollfd" which then gets redefined in "os_support.h".
+#define WIN32_LEAN_AND_MEAN
+
+
#include "config.h"
#include <ctype.h>
#include <string.h>
15 changes: 15 additions & 0 deletions ports/ffmpeg/0013-define-WINVER.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --color -Naur src_old/libavcodec/mf_utils.c src/libavcodec/mf_utils.c
--- src_old/libavcodec/mf_utils.c 2020-07-11 05:26:17.000000000 +0700
+++ src/libavcodec/mf_utils.c 2020-11-13 12:55:57.226976400 +0700
@@ -22,6 +22,11 @@
#define _WIN32_WINNT 0x0602
#endif

+#if !defined(WINVER) || WINVER < 0x0602
+#undef WINVER
+#define WINVER 0x0602
+#endif
+
#include "mf_utils.h"
#include "libavutil/pixdesc.h"

2 changes: 1 addition & 1 deletion ports/ffmpeg/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: ffmpeg
Version: 4.3.1
Port-Version: 7
Port-Version: 8
Homepage: https://ffmpeg.org
Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.
Expand Down
76 changes: 46 additions & 30 deletions ports/ffmpeg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ vcpkg_from_github(
0010-Fix-x264-detection.patch
0011-Fix-x265-detection.patch
0012-Fix-ssl-110-detection.patch
0013-define-WINVER.patch
)

if (SOURCE_PATH MATCHES " ")
Expand All @@ -25,7 +26,7 @@ endif()
vcpkg_find_acquire_program(YASM)
get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)

if(VCPKG_TARGET_IS_WINDOWS)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
#We're assuming that if we're building for Windows we're using MSVC
set(INCLUDE_VAR "INCLUDE")
set(LIB_PATH_VAR "LIB")
Expand Down Expand Up @@ -60,7 +61,15 @@ if(VCPKG_TARGET_IS_WINDOWS)
endif()

set(SHELL ${MSYS_ROOT}/usr/bin/bash.exe)
set(OPTIONS "--toolchain=msvc ${OPTIONS}")
if(VCPKG_TARGET_IS_MINGW)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(OPTIONS "--target-os=mingw32 ${OPTIONS}")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(OPTIONS "--target-os=mingw64 ${OPTIONS}")
endif()
else()
set(OPTIONS "--toolchain=msvc ${OPTIONS}")
endif()
else()
set(SHELL /bin/sh)
endif()
Expand Down Expand Up @@ -375,7 +384,9 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
endif()
endif()

if(VCPKG_TARGET_IS_WINDOWS)
if(VCPKG_TARGET_IS_MINGW)
set(OPTIONS "${OPTIONS} --extra_cflags=-D_WIN32_WINNT=0x0601")
elseif(VCPKG_TARGET_IS_WINDOWS)
set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0")
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd")
Expand Down Expand Up @@ -442,36 +453,41 @@ endif()

if(VCPKG_TARGET_IS_WINDOWS)
file(GLOB DEF_FILES ${CURRENT_PACKAGES_DIR}/lib/*.def ${CURRENT_PACKAGES_DIR}/debug/lib/*.def)

if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(LIB_MACHINE_ARG /machine:ARM)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(LIB_MACHINE_ARG /machine:ARM64)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(LIB_MACHINE_ARG /machine:x86)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(LIB_MACHINE_ARG /machine:x64)
else()
message(FATAL_ERROR "Unsupported target architecture")

if(NOT VCPKG_TARGET_IS_MINGW)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(LIB_MACHINE_ARG /machine:ARM)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(LIB_MACHINE_ARG /machine:ARM64)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(LIB_MACHINE_ARG /machine:x86)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(LIB_MACHINE_ARG /machine:x64)
else()
message(FATAL_ERROR "Unsupported target architecture")
endif()

foreach(DEF_FILE ${DEF_FILES})
get_filename_component(DEF_FILE_DIR "${DEF_FILE}" DIRECTORY)
get_filename_component(DEF_FILE_NAME "${DEF_FILE}" NAME)
string(REGEX REPLACE "-[0-9]*\\.def" "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" OUT_FILE_NAME "${DEF_FILE_NAME}")
file(TO_NATIVE_PATH "${DEF_FILE}" DEF_FILE_NATIVE)
file(TO_NATIVE_PATH "${DEF_FILE_DIR}/${OUT_FILE_NAME}" OUT_FILE_NATIVE)
message(STATUS "Generating ${OUT_FILE_NATIVE}")
vcpkg_execute_required_process(
COMMAND lib.exe /def:${DEF_FILE_NATIVE} /out:${OUT_FILE_NATIVE} ${LIB_MACHINE_ARG}
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}
LOGNAME libconvert-${TARGET_TRIPLET}
)
endforeach()
endif()

foreach(DEF_FILE ${DEF_FILES})
get_filename_component(DEF_FILE_DIR "${DEF_FILE}" DIRECTORY)
get_filename_component(DEF_FILE_NAME "${DEF_FILE}" NAME)
string(REGEX REPLACE "-[0-9]*\\.def" "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" OUT_FILE_NAME "${DEF_FILE_NAME}")
file(TO_NATIVE_PATH "${DEF_FILE}" DEF_FILE_NATIVE)
file(TO_NATIVE_PATH "${DEF_FILE_DIR}/${OUT_FILE_NAME}" OUT_FILE_NATIVE)
message(STATUS "Generating ${OUT_FILE_NATIVE}")
vcpkg_execute_required_process(
COMMAND lib.exe /def:${DEF_FILE_NATIVE} /out:${OUT_FILE_NATIVE} ${LIB_MACHINE_ARG}
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}
LOGNAME libconvert-${TARGET_TRIPLET}
)
endforeach()


file(GLOB EXP_FILES ${CURRENT_PACKAGES_DIR}/lib/*.exp ${CURRENT_PACKAGES_DIR}/debug/lib/*.exp)
file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX})
list(APPEND FILES_TO_REMOVE ${EXP_FILES} ${LIB_FILES} ${DEF_FILES})
if(VCPKG_TARGET_IS_MINGW)
file(GLOB LIB_FILES_2 ${CURRENT_PACKAGES_DIR}/bin/*.lib ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib)
endif()
list(APPEND FILES_TO_REMOVE ${EXP_FILES} ${LIB_FILES} ${LIB_FILES_2} ${DEF_FILES})
if(FILES_TO_REMOVE)
file(REMOVE ${FILES_TO_REMOVE})
endif()
Expand Down
2 changes: 1 addition & 1 deletion ports/libogg/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: libogg
Version: 1.3.4
Port-Version: 2
Port-Version: 3
Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs.
Homepage: https://github.com/xiph/ogg
4 changes: 4 additions & 0 deletions ports/libogg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ vcpkg_from_github(
HEAD_REF master
)

if(VCPKG_TARGET_IS_MINGW)
vcpkg_replace_string(${SOURCE_PATH}/win32/ogg.def "LIBRARY ogg" "LIBRARY libogg")
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
Expand Down
2 changes: 1 addition & 1 deletion ports/libvpx/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: libvpx
Version: 1.9.0
Port-Version: 3
Port-Version: 4
Homepage: https://github.com/webmproject/libvpx
Description: The reference software implementation for the video coding formats VP8 and VP9.
Supports: !(uwp&arm)
Expand Down
2 changes: 1 addition & 1 deletion ports/libvpx/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ else()
endif()

include(${CURRENT_INSTALLED_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake)
yasm_tool_helper(PREPEND_TO_PATH)
yasm_tool_helper(PREPEND_TO_PATH OUT_VAR ENV{AS})

if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)

Expand Down
2 changes: 1 addition & 1 deletion ports/mp3lame/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: mp3lame
Version: 3.100
Port-Version: 4
Port-Version: 5
Homepage: http://lame.sourceforge.net/
Description: LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL.
66 changes: 20 additions & 46 deletions ports/mp3lame/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ vcpkg_from_sourceforge(
REF ${VERSION}
FILENAME "lame-${VERSION}.tar.gz"
SHA512 0844b9eadb4aacf8000444621451277de365041cc1d97b7f7a589da0b7a23899310afd4e4d81114b9912aa97832621d20588034715573d417b2923948c08634b
PATCHES 00001-msvc-upgrade-solution-up-to-vc11.patch
PATCHES
00001-msvc-upgrade-solution-up-to-vc11.patch
remove_lame_init_old_from_symbol_list.patch # deprecated https://github.com/zlargon/lame/blob/master/include/lame.h#L169
)

if(VCPKG_TARGET_IS_WINDOWS)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)

if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(platform "ARM64")
Expand Down Expand Up @@ -84,59 +86,31 @@ else()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(OPTIONS --enable-static=yes --enable-shared=no)
set(MP3LAME_LIB "libmp3lame.a")
set(MP3LAME_LIB "libmp3lame.${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}")
else()
set(OPTIONS --enable-shared=yes --enable-static=no)
set(MP3LAME_LIB "libmp3lame.so")
if(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX)
set(MP3LAME_LIB "libmp3lame.${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}")
else()
set(MP3LAME_LIB "libmp3lame.${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}")
endif()
endif()

if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
if(NOT VCPKG_TARGET_IS_MINGW)
string(APPEND OPTIONS --with-pic=yes)
endif()

message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
vcpkg_execute_required_process(
COMMAND ${SOURCE_PATH}/configure ${OPTIONS} --with-pic=yes --prefix=${CURRENT_PACKAGES_DIR}/debug
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
LOGNAME configure-${TARGET_TRIPLET}-dbg
)
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
vcpkg_execute_required_process(
COMMAND make -j install "CFLAGS=${CFLAGS}" "LDFLAGS=${LDFLAGS}"
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
LOGNAME install-${TARGET_TRIPLET}-dbg
)
vcpkg_configure_make(
SOURCE_PATH ${SOURCE_PATH}
DETERMINE_BUILD_TRIPLET
OPTIONS ${OPTIONS}
)

file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/bin
vcpkg_install_make()
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
)
endif()

if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)

message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
vcpkg_execute_required_process(
COMMAND ${SOURCE_PATH}/configure ${OPTIONS} --with-pic=yes --prefix=${CURRENT_PACKAGES_DIR}
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
LOGNAME configure-${TARGET_TRIPLET}-rel
)

message(STATUS "Building ${TARGET_TRIPLET}-rel")
vcpkg_execute_required_process(
COMMAND make -j install "CFLAGS=${CFLAGS}" "LDFLAGS=${LDFLAGS}"
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
LOGNAME install-${TARGET_TRIPLET}-rel
)

if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
endif()

endif()

endif()

Expand Down
9 changes: 9 additions & 0 deletions ports/mp3lame/remove_lame_init_old_from_symbol_list.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
diff --color -Naur src_old/include/libmp3lame.sym src/include/libmp3lame.sym
--- src_old/include/libmp3lame.sym 2017-09-07 02:33:35.000000000 +0700
+++ src/include/libmp3lame.sym 2020-11-12 17:45:59.946448300 +0700
@@ -1,5 +1,4 @@
lame_init
-lame_init_old
lame_set_num_samples
lame_get_num_samples
lame_set_in_samplerate
2 changes: 1 addition & 1 deletion ports/x264/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: x264
Version: 157-303c484ec828ed0
Port-Version: 13
Port-Version: 14
Homepage: https://github.com/mirror/x264
Description: x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format
Build-Depends: pthread (linux&osx)
2 changes: 1 addition & 1 deletion ports/x264/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
endif()
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libx264.dll.lib ${CURRENT_PACKAGES_DIR}/lib/libx264.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libx264.dll.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libx264.lib)
elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
Expand Down
1 change: 1 addition & 0 deletions ports/x265/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Source: x265
Version: 3.4
Port-Version: 1
Homepage: https://github.com/videolan/x265
Description: x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream.
17 changes: 16 additions & 1 deletion ports/x265/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,28 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_TARGET_IS_LINUX)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
endif()

if(WIN32 AND (NOT MINGW))
if(VCPKG_TARGET_IS_WINDOWS AND (NOT VCPKG_TARGET_IS_MINGW))
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc" "-lx265" "-lx265-static")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc" "-lx265" "-lx265-static")
endif()
endif()

# maybe create vcpkg_regex_replace_string?

file(READ ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc _contents)
string(REGEX REPLACE "-l(std)?c\\+\\+" "" _contents "${_contents}")
file(WRITE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc "${_contents}")

file(READ ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc _contents)
string(REGEX REPLACE "-l(std)?c\\+\\+" "" _contents "${_contents}")
file(WRITE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc "${_contents}")

if(VCPKG_TARGET_IS_MINGW AND ENABLE_SHARED)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libx265.a)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libx265.a)
endif()

if(UNIX)
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES numa)
else()
Expand Down
4 changes: 2 additions & 2 deletions scripts/cmake/vcpkg_common_definitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,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
Expand Down
6 changes: 3 additions & 3 deletions scripts/cmake/vcpkg_configure_make.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ macro(_vcpkg_extract_cpp_flags_and_set_cflags_and_cxxflags _SUFFIX)
endmacro()

function(vcpkg_configure_make)
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _csc
"AUTOCONFIG;SKIP_CONFIGURE;COPY_SOURCE;DISABLE_VERBOSE_FLAGS;NO_ADDITIONAL_PATHS;ADD_BIN_TO_PATH;USE_WRAPPERS;DETERMINE_BUILD_TRIPLET"
"SOURCE_PATH;PROJECT_SUBPATH;PRERUN_SHELL;BUILD_TRIPLET"
Expand Down Expand Up @@ -481,7 +481,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)
Expand All @@ -498,6 +497,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)

Expand Down Expand Up @@ -677,7 +677,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)
Expand Down