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

Feature request: omit unneeded asset files #134

Open
wkjarosz opened this issue Jan 11, 2025 · 1 comment
Open

Feature request: omit unneeded asset files #134

wkjarosz opened this issue Jan 11, 2025 · 1 comment

Comments

@wkjarosz
Copy link
Contributor

Currently, hello_imgui_add_app copies over the entire assets folder. However, many of the assets are platform specific (e.g. app_settings/apple is only needed on apple system). When distributing the binary for my application, I'd prefer to only include the assets that are needed for that specific platform. Is this currently possible?

As a work-around, I can point hello_imgui_add_app to a custom ASSETS_LOCATION which I selectively copy things into. I set MY_RESOURCE_FILES based on the target platform and then do:

foreach(MY_RESOURCE_FILE ${MY_RESOURCE_FILES})
  configure_file(
    ${CMAKE_CURRENT_SOURCE_DIR}/${MY_RESOURCE_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${MY_RESOURCE_FILE} COPYONLY
  )
endforeach()

It's a bit clunky, and will require updating if hello imgui expands its set of default assets, but works fine, so it may not be necessary for hello imgui to provide such functionality directly.

However, hello_imgui_add_app still copies DroidSans, and both version 4 and 6 of font awesome into the final assets directory. I'm using my own default font and icons, and would prefer to avoid the additional size and clutter. Is it possible to ask hello_imgui_add_app to omit copying these, and if not, would you consider adding such an option?

@pthom
Copy link
Owner

pthom commented Jan 13, 2025

Hello,

I will leave this open so it is not forgotten. It is not on my urgent task
List at the moment , as I do have to work on multiple projects at the same time.

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

No branches or pull requests

2 participants