mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 14:43:04 +08:00
[many ports] Fix various problems with mingw (#12886)
This commit is contained in:
parent
d80a3de309
commit
d355b3fae0
@ -1,6 +1,6 @@
|
||||
Source: freetype
|
||||
Version: 2.10.2
|
||||
Port-Version: 2
|
||||
Port-Version: 3
|
||||
Build-Depends: zlib, brotli
|
||||
Homepage: https://www.freetype.org/
|
||||
Description: A library to render fonts.
|
||||
|
@ -66,7 +66,7 @@ if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/freetype2.pc")
|
||||
string(REPLACE "-I\${includedir}/freetype2" "-I\${includedir}" _contents "${_contents}")
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/freetype2.pc" "${_contents}")
|
||||
endif()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
@ -1,4 +1,5 @@
|
||||
Source: libmodplug
|
||||
Version: 0.8.9.0-5
|
||||
Version: 0.8.9.0
|
||||
Port-Version: 6
|
||||
Homepage: https://github.com/Konstanty/libmodplug
|
||||
Description: The ModPlug mod file playing library.
|
||||
|
@ -31,11 +31,16 @@ vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_TARGET_IS_WINDOWS)
|
||||
if(VCPKG_TARGET_IS_MINGW)
|
||||
set(BIN_NAME libmodplug.dll)
|
||||
else()
|
||||
set(BIN_NAME modplug.dll)
|
||||
endif()
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/modplug.dll ${CURRENT_PACKAGES_DIR}/bin/modplug.dll)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/${BIN_NAME} ${CURRENT_PACKAGES_DIR}/bin/${BIN_NAME})
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/modplug.dll ${CURRENT_PACKAGES_DIR}/debug/bin/modplug.dll)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/${BIN_NAME} ${CURRENT_PACKAGES_DIR}/debug/bin/${BIN_NAME})
|
||||
vcpkg_copy_pdbs()
|
||||
endif()
|
||||
|
||||
|
@ -14,9 +14,18 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
avx AVX_SUPPORTED
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_MINGW)
|
||||
set(STACK_PROTECTOR OFF)
|
||||
string(APPEND VCPKG_C_FLAGS "-D_FORTIFY_SOURCE=0")
|
||||
string(APPEND VCPKG_CXX_FLAGS "-D_FORTIFY_SOURCE=0")
|
||||
else()
|
||||
set(STACK_PROTECTOR ON)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
-DOPUS_STACK_PROTECTOR=${STACK_PROTECTOR}
|
||||
PREFER_NINJA)
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Opus)
|
||||
|
Loading…
Reference in New Issue
Block a user