mirror of https://github.com/microsoft/vcpkg.git
[flac] Disable stack smash protection and FORTIFY_SOURCE for mingw (#12761)
* [flac] Disable stack smash protection and FORTIFY_SOURCE for mingw * Change flag injection + copyright install
This commit is contained in:
parent
23d4072643
commit
80ef2a3455
|
|
@ -1,6 +1,6 @@
|
|||
Source: libflac
|
||||
Version: 1.3.3
|
||||
Port-Version: 2
|
||||
Port-Version: 3
|
||||
Homepage: https://xiph.org/flac/
|
||||
Description: Library for manipulating FLAC files
|
||||
Build-Depends: libogg
|
||||
|
|
|
|||
|
|
@ -15,6 +15,14 @@ else()
|
|||
set(BUILD_SHARED_LIBS OFF)
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_MINGW)
|
||||
set(WITH_STACK_PROTECTOR OFF)
|
||||
string(APPEND VCPKG_C_FLAGS "-D_FORTIFY_SOURCE=0")
|
||||
string(APPEND VCPKG_CXX_FLAGS "-D_FORTIFY_SOURCE=0")
|
||||
else()
|
||||
set(WITH_STACK_PROTECTOR ON)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
|
|
@ -23,7 +31,8 @@ vcpkg_configure_cmake(
|
|||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_DOCS=OFF
|
||||
-DBUILD_TESTING=OFF
|
||||
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS})
|
||||
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
|
||||
-DWITH_STACK_PROTECTOR=${WITH_STACK_PROTECTOR})
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(
|
||||
|
|
@ -57,5 +66,4 @@ endif()
|
|||
|
||||
# This license (BSD) is relevant only for library - if someone would want to install
|
||||
# FLAC cmd line tools as well additional license (GPL) should be included
|
||||
file(COPY ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/libflac)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libflac/COPYING.Xiph ${CURRENT_PACKAGES_DIR}/share/libflac/copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
|
|
|||
Loading…
Reference in New Issue