Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
2 changes: 1 addition & 1 deletion ports/libflac/CONTROL
Original file line number Diff line number Diff line change
@@ -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
12 changes: 11 additions & 1 deletion ports/libflac/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ else()
set(BUILD_SHARED_LIBS OFF)
endif()

if(VCPKG_TARGET_IS_MINGW)
set(WITH_STACK_PROTECTOR OFF)
set(DISABLE_FORTIFYING "-D_FORTIFY_SOURCE=0")
else()
set(WITH_STACK_PROTECTOR ON)
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
Expand All @@ -23,7 +30,10 @@ 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}
-DCMAKE_C_FLAGS=${DISABLE_FORTIFYING}
-DCMAKE_CXX_FLAGS=${DISABLE_FORTIFYING})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These shouldn't be passed like this, because it will compete with the flags being passed inside vcpkg_configure_cmake(); instead, we should append the flag to VCPKG_C(XX)_FLAGS:

string(APPEND VCPKG_C_FLAGS " ${DISABLE_FORTIFYING}")
vcpkg_configure_cmake( .... )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright I'll change it


vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(
Expand Down