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

Migrate to a component-style build system #1063

Merged
merged 11 commits into from
Sep 3, 2023
Merged

Conversation

Xaymar
Copy link
Contributor

@Xaymar Xaymar commented Sep 3, 2023

Explain the Pull Request

As the old system of putting everything into a single CMake file is starting to show its age (and problems too), it was time to migrate to a better alternative. Since I did not want to make each feature of StreamFX compile by itself (yet), I opted for a "simple" component system. This can eventually be adapted to allow each component to generate its own plugin if necessary.

Completion Checklist

  • This has been tested on the following platforms:
    • MacOS 10.15
    • MacOS 11
    • MacOS 12
    • Ubuntu 20.04
    • Ubuntu 22.04
    • Windows 10
    • Windows 11
  • The copyright headers and license files have been updated.
  • I will maintain this for the forseeable future, and have added myself to CODEOWNERS.

The old fake component system is starting to be very annoying to work with, as it doesn't properly split things apart. The new system should aid with this significantly, and make errors easier to spot.
We should always link the whole object, even if nothing is needed by the module itself.
add_subdirectory creates a new "stack" of variables, so PARENT_SCOPE points nowhere. Well it points to the outside of the function, which is not outside of the subproject.
Using PROJECT_NAME makes it incompatible with add_subdirectory, and it's really not necessary anyway. There are no plans to rename the project again.

Also needed to expose some information to be public, so that components could actually use it. Seems to be working as intended finally.
The module only holds the resources file, so Qt is not needed here.
While this would normally work no questions asked in something like 'make', 'nmake' or similar, it is an impossible task in CMake without an empty file. So we'll just provide it with an empty file.
@Xaymar Xaymar merged commit 54cd3ee into root Sep 3, 2023
5 of 8 checks passed
@Xaymar Xaymar deleted the patch/componentification branch September 3, 2023 13:32
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.

1 participant