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

Add helpful error messages if Irrlicht library or include dir are set incorrectly #11232

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

sfan5
Copy link
Member

@sfan5 sfan5 commented Apr 25, 2021

ref #11231, #11218

These changes work "indirectly", by removing the path if it's set incorrectly the build process will not proceed and the user informed directly that something isn't right.

To do

This PR is Ready for Review.

How to test

  • Set IRRLICHT_INCLUDE_DIR to a file, observe error message
  • Set IRRLICHT_INCLUDE_DIR to a directory that doesn't contain irrlicht.h, observe error message
  • Set IRRLICHT_LIBRARY to a directory, observe error message
  • Set IRRLICHT_LIBRARY to anything that's not a library, observe error message
  • Set paths correctly, observe everything working

@sfan5 sfan5 added the Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements label Apr 25, 2021
mark_as_advanced(CLEAR IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR)
# Handholding for users
if(IRRLICHT_INCLUDE_DIR AND (NOT IS_DIRECTORY "${IRRLICHT_INCLUDE_DIR}" OR
NOT EXISTS "${IRRLICHT_INCLUDE_DIR}/irrlicht.h"))
Copy link
Member

Choose a reason for hiding this comment

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

Missing tab, also on L42

Copy link
Member Author

Choose a reason for hiding this comment

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

Do we also apply that code style to cmake?

Copy link
Member

Choose a reason for hiding this comment

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

Good question actually 🤷

well, it's nitpicking, so just keep it as-is.

Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

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

LGTM

@sfan5 sfan5 merged commit 734fb2c into minetest:master Apr 28, 2021
@sfan5 sfan5 deleted the cmakeUX branch April 28, 2021 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements One approval ✅ ◻️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants