-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[vcpkg_fixup_cmake_targets] Add NO_PREFIX_CORRECTION #12215
[vcpkg_fixup_cmake_targets] Add NO_PREFIX_CORRECTION #12215
Conversation
#original folder deepness to CURRENT_PACKAGES_DIR in comparison to the moved to folder deepness which | ||
#is always at least (>=) 2, e.g. share/${PORT}. Currently the code assumes it is always 2 although | ||
#this requirement is only true for the *Config.cmake. The targets are not required to be in the same | ||
#folder as the *Config.cmake! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like it would be best to fix this to handle the targets case instead of adding a switch to disable and then needing to manually write the same fixup code in every port that uses said switch. Do you have an idea of how difficult that would be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calculate relative path from CURRENT_PACKAGES_DIR/<targetfilelocation>
to CURRENT_PACKAGES_DIR
and count the backticks /..
do the same for CURRENT_PACKAGES_DIR/<newtargetfilelocation>
to CURRENT_PACKAGES_DIR
and also count the /..
.
The first count gives the number of get_filename_component
to replace while the later defines the number of get_filename_component
required. If the count is equal no replacement is necessary. It is not too difficult but probably requires a ton of try and error to just get it to work correctly.
I just added NO_PREFIX_CORRECTION as a quick fix since I need it for one of my personal ports. You can always deprecate the parameter later if you have the above mentioned fix. (And probably not a lot of ports require it.)
Co-authored-by: Robert Schumacher <[email protected]>
waiting for merge #12458 . |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
boost-iostreams:
I can't get it, we already build itk:x64-osx:
|
…e_prefix_correction # Conflicts: # scripts/cmake/vcpkg_fixup_cmake_targets.cmake
# Conflicts: # scripts/cmake/vcpkg_fixup_cmake_targets.cmake
Merging as the errors are unrelated. |
In some cases the applied prefix correction of
vcpkg_fixup_cmake_targets
is wrong.The option
NO_PREFIX_CORRECTION
deactivates the correction of the_IMPORT_PREFIX