Skip to content

[cmake] Install libraries in standard directories#685

Merged
compnerd merged 8 commits intoapple:mainfrom
Steelskin:cmake-install-folders
Feb 3, 2025
Merged

[cmake] Install libraries in standard directories#685
compnerd merged 8 commits intoapple:mainfrom
Steelskin:cmake-install-folders

Conversation

@Steelskin
Copy link
Copy Markdown
Contributor

Previously, libraries were installed under lib/swift/${os}/. They should be installed in the default library directory for the relevant target system.
In addition, swiftmodules were installed in the older layout format on non-Darwin platforms. This changes to use the standard modern layout format for swiftmodules.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

Previously, libraries were installed under `lib/swift/${os}/`. They
should be installed in the default library directory for the relevant
target system.
In addition, swiftmodules were installed in the older layout format on
non-Darwin platforms. This changes to use the standard modern layout
format for swiftmodules.
@Steelskin
Copy link
Copy Markdown
Contributor Author

@compnerd Before I get started on other libraries, is this what you had in mind?

@compnerd compnerd requested a review from etcwilde November 20, 2024 23:26
@Steelskin Steelskin requested a review from compnerd November 20, 2024 23:57
@Steelskin Steelskin force-pushed the cmake-install-folders branch from 9ea1bc0 to 34f4919 Compare November 20, 2024 23:57
@compnerd
Copy link
Copy Markdown
Collaborator

@swift-ci please test

@compnerd
Copy link
Copy Markdown
Collaborator

This is going to require a cross-repository test to ensure that the toolchain builds don't break.

@Steelskin Steelskin requested a review from etcwilde November 21, 2024 01:50
@Steelskin Steelskin requested a review from etcwilde December 2, 2024 16:44
@Steelskin Steelskin requested a review from compnerd January 28, 2025 21:49
@compnerd
Copy link
Copy Markdown
Collaborator

@swift-ci please test

Copy link
Copy Markdown
Member

@etcwilde etcwilde left a comment

Choose a reason for hiding this comment

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

Feel free to leave a bug report on CMake, but at the moment, GNUINstallDirs doesn't work for projects that only use Swift due to how CMake detects the correct library install dirs.

@Steelskin
Copy link
Copy Markdown
Contributor Author

Feel free to leave a bug report on CMake, but at the moment, GNUINstallDirs doesn't work for projects that only use Swift due to how CMake detects the correct library install dirs.

I filed https://gitlab.kitware.com/cmake/cmake/-/issues/26649 for this

@Steelskin Steelskin requested a review from etcwilde January 29, 2025 19:58
@compnerd
Copy link
Copy Markdown
Collaborator

@swift-ci please test

Enabling the C language after Swift was causing issues with using the C
compiler.
@Steelskin
Copy link
Copy Markdown
Contributor Author

I did a small update to enable C as part of the project definition. I was hitting issues with the C compiler otherwise.

@compnerd
Copy link
Copy Markdown
Collaborator

@swift-ci please test

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.

3 participants