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

Custom include for im3d_config.h #49

Closed
jlaumon opened this issue May 16, 2021 · 1 comment · Fixed by #50
Closed

Custom include for im3d_config.h #49

jlaumon opened this issue May 16, 2021 · 1 comment · Fixed by #50

Comments

@jlaumon
Copy link
Contributor

jlaumon commented May 16, 2021

Hey John!

How about adding something like IMGUI_USER_CONFIG, which allows including a different file in case you don't want to modify im3d_config.h? (If you use im3d as a submodule for example.)

// Configuration file with compile-time options (edit imconfig.h or '#define IMGUI_USER_CONFIG "myfilename.h" from your build system')
#ifdef IMGUI_USER_CONFIG
#include IMGUI_USER_CONFIG
#endif
#if !defined(IMGUI_DISABLE_INCLUDE_IMCONFIG_H) || defined(IMGUI_INCLUDE_IMCONFIG_H)
#include "imconfig.h"
#endif

I can make a PR if you're interested.

Cheers

@john-chapman
Copy link
Owner

Ah, good idea! I'm not sure about the utility of the IMGUI_DISABLE_INCLUDE_IMCONFIG_H/IMGUI_INCLUDE_IMCONFIG_H macros, I'd prefer something like this:

#ifdef IM3D_CONFIG
   #include IM3D_CONFIG
#else
   #include "im3d_config.h"
#endif

Could always add those extra control macros if there's ever a use case for them.

If you've got time a PR would be cool!

Cheers.

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 a pull request may close this issue.

2 participants