Skip to content

[CMake] Include GNUInstallDirs #4996

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

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

jmschonfeld
Copy link
Contributor

The GNUInstallDirs module sets CMAKE_INSTALL_BINDIR which is used on Windows as the destination for installed .dll files. This addresses issues that I saw when building a Windows toolchain where the .dll files were not installed into the toolchain previously, but with this change are correctly installed into the bin directory.

@@ -134,6 +134,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
"-I/usr/lib/swift") # dispatch
endif()

include(GNUInstallDirs)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just double check: it's okay to set it for all platforms (not just windows right?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep! Linux tests + toolchain builds pass with this change too - I suspect this would have also led to an issue on Linux with plutil not being installed since it too would be installed into the runtime directory, so it's likely not only safe but necessary there too

@jmschonfeld jmschonfeld merged commit 9118940 into swiftlang:package Jun 28, 2024
@jmschonfeld jmschonfeld deleted the cmake/import-gnu branch June 28, 2024 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants