-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[scripts] Fix vcpkg_fixup_cmake on non Windows platforms #5630
[scripts] Fix vcpkg_fixup_cmake on non Windows platforms #5630
Conversation
Script was only handling tools executables ending with .exe. Changed it so anything under /bin/ in transformed. This fixes for instance FlatcTargets-release.cmake from flatbuffers port on osx.
Have you tested this on Windows? The bin folder contains the *.dlls and *.pdbs on Windows not only the exe. I tried something with CMAKE_EXECUTABLE_SUFFIX within a port a short while ago on windows but it failed du to CMAKE_EXECUTABLE_SUFFIX not being set to .exe for some reason |
I did not test this under Windows for now, as I will only be able to do this later today. But, I would hope it works as this commit is only about changing references to files inside some I'll update the PR when I have tested it |
If those references are pointing to the wrong direction cmake has a problem. From the VTK Portfile:
So PCL will probably fail with your commit or some external project with wants to install the vtk dlls will fail to do so. (e.g. not installing the required dlls) |
I confirm that trying to solve the problem with executables on non Windows platforms, my commit does break Windows DLL support in the aforementioned files. I'll submit an updated PR later today. |
On Windows platforms use .exe. On other platforms do not use any extension.
0ee83b7
to
61c4daa
Compare
I have pushed an updated version where:
As of now, I have been able to successfully build pcl on Windows, vtk, harfbuzz on Windows and OSX, resolving regressions introduced by earlier version of the PR. |
@@ -27,6 +28,13 @@ function(vcpkg_fixup_cmake_targets) | |||
set(_vfct_TARGET_PATH share/${PORT}) | |||
endif() | |||
|
|||
|
|||
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Windows") |
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.
does this include WindowsStore? (I dont know if WindowsStore is also exe)
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 does not include WindowsStore as I have made a typo: Windows is already tested by the empty VCPKG_CMAKE_SYSTEM_NAME. The second one was intended to be WindowsStore.
Will fix it.
Windows Desktop is already tested as empty VCPKG_CMAKE_SYSTEM_NAME.
Integration test is failing for now because of microsoft#5630 and microsoft#5635 This at least makes the package function on Windows x86 and x64.
LGTM |
/azp run |
At preliminary glance at the test results tells me they are probably all unrelated failures (flaky or conflicting ports) I am looking into the failures and will report back anything that looks like it could be valid. |
ports/grpc/CONTROL
Outdated
@@ -1,4 +1,4 @@ | |||
Source: grpc | |||
Version: 1.21.1 | |||
Version: 1.21.1-1 |
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.
@Rastaban: If you are already touching grpc you probably also want to move the extra handling of grpc in the toolchain file vcpkg.cmake in the find_package function into a separate vcpkg_cmake_wrapper.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.
ah already merged nevermind
Now that microsoft#5630 is fix, this package is fully supported on both Linux and Mac OS X.
Now that #5630 is fix, this package is fully supported on both Linux and Mac OS X.
Now that microsoft#5630 is fix, this package is fully supported on both Linux and Mac OS X.
Script was only handling tools executables ending with .exe.
Changed it so anything under /bin/ in transformed.
This fixes for instance FlatcTargets-release.cmake from flatbuffers
port on osx.