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

raylib: Add some useful headers to res folder #24472

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AbrilRBS
Copy link
Member

@AbrilRBS AbrilRBS commented Jun 29, 2024

Summary

Changes to recipe: raylib/[*]

Motivation

As explained in #24368, the library does not package some useful files that users might want to use as part of their build. This is similar to the imgui situation, so the solution is also similar: Add those files to the res folder, where users can then copy them from

Details

The linked issue and subsequent upstream issue have all the relevant info

As a draft until I get a chance to update the hook that will fail

cc @Ezbob

@AbrilRBS AbrilRBS self-assigned this Jun 29, 2024
@AbrilRBS AbrilRBS linked an issue Jun 29, 2024 that may be closed by this pull request
@conan-center-bot

This comment has been minimized.

@Ezbob
Copy link

Ezbob commented Jul 1, 2024

Hey @AbrilRBS , big thanks for this.
I have a noob question though, how do you use/copy these headers in your conan file from a consumers perspective?

@conan-center-bot

This comment has been minimized.

@AbrilRBS
Copy link
Member Author

AbrilRBS commented Jul 2, 2024

Hi @Ezbob, not a noob question at all, I should have been more clear as to how to proceed, sorry about that!

We're going to make this available thru a conf as @uilianries suggested - I'll post a how-to after I commit the changes :)

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 4 (a013e062c4ca5daab8570603ea8baf2551b9564f):

  • raylib/5.0:
    All packages built successfully! (All logs)

  • raylib/3.5.0:
    All packages built successfully! (All logs)

  • raylib/4.0.0:
    All packages built successfully! (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 3 (a013e062c4ca5daab8570603ea8baf2551b9564f):

  • raylib/5.0:
    All packages built successfully! (All logs)

  • raylib/4.0.0:
    All packages built successfully! (All logs)

  • raylib/3.5.0:
    All packages built successfully! (All logs)

@AbrilRBS
Copy link
Member Author

AbrilRBS commented Jul 4, 2024

With the current approach (pending dismissal from someone on the team if they don't like it) would be for you to compile your package as normal, but add the user.raylib:include_res=True conf, either in your CLI with -c="user.raylib:include_res=True", or in your profile:

[conf]
user.raylib:include_res=True

This will make it so the recipe adds the new include path to your project, giving you access to those files.

The alternative approach if you don't need everything, or only need certain files, would be NOT to define the conf, and instead in your recipe's generate() method, have:

def generate(self):
    # ... The rest of your generate method ...
    copy(self, pattern="rcamera.h", src=self.dependencies["raylib"].cpp_info.resdirs[0], dst=os.path.join(self.build_folder, "path-where-you-want-thefiles")

This would only copy rcamera.h and would give you the liberty of moving it to a place of your liking - hope this helps :)

@Ezbob
Copy link

Ezbob commented Jul 5, 2024

@AbrilRBS Oh that look nice! Huge thanks for this!

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.

[package] raylib/5.0: Missing rcamera.h header
4 participants