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

CMake: Use PROJECT_SOURCE_DIR to improve using mosquitto as subdirectory #2504

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

Hallot
Copy link
Contributor

@Hallot Hallot commented Apr 5, 2022

When mosquitto is included as subdirectory, CMAKE_SOURCE_DIR does not refer to the mosquitto top level CMake file, but to the whole project top level CMake.
Use PROJECT_SOURCE_DIR instead to refer to the right CMake in both contextes.

Signed-off-by: Pierre Hallot [email protected]

  • Have you signed the Eclipse Contributor Agreement, using the same email address as you used in your commits?
  • Do each of your commits have a "Signed-off-by" line, with the correct email address? Use "git commit -s" to generate this line for you.
  • If you are contributing a bugfix, is your work based off the fixes branch?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run make test with your changes locally?

When mosquitto is included as subdirectory, `CMAKE_SOURCE_DIR` does not refer to the mosquitto top level CMake file, but to the whole project top level CMake.
Use `PROJECT_SOURCE_DIR` instead to refer to the right CMake in both contextes.

Signed-off-by: Pierre Hallot <[email protected]>
@ralight
Copy link
Contributor

ralight commented Apr 11, 2022

Thank you, I hadn't considered this way of including projects as subdirectories and how it would affect the build.

@ralight ralight merged commit 3cdeb59 into eclipse:fixes Apr 11, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants