Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VCPKG_(PRE|POST)_PORTFILE_INCLUDES for code injection before/after the portfile #25847

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Changes from all commits
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
11 changes: 11 additions & 0 deletions scripts/ports.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,18 @@ if(CMD STREQUAL "BUILD")
set(Z_VCPKG_ERROR_LOG_COLLECTION_FILE "${CURRENT_BUILDTREES_DIR}/error-logs-${TARGET_TRIPLET}.txt")
file(REMOVE "${Z_VCPKG_ERROR_LOG_COLLECTION_FILE}")

foreach(z_pre_portfile_include IN LISTS VCPKG_PRE_PORTFILE_INCLUDES)
include("${z_pre_portfile_include}")
endforeach()
unset(z_pre_portfile_include)

include("${CURRENT_PORT_DIR}/portfile.cmake")

foreach(z_post_portfile_include IN LISTS VCPKG_POST_PORTFILE_INCLUDES)
include("${z_post_portfile_include}")
endforeach()
unset(z_post_portfile_include)

if(DEFINED PORT)
# Always fixup RPATH on linux unless explicitly disabled.
if(VCPKG_FIXUP_ELF_RPATH OR (VCPKG_TARGET_IS_LINUX AND NOT DEFINED VCPKG_FIXUP_ELF_RPATH))
Expand Down