mirror of
https://github.com/ocornut/imgui.git
synced 2026-10-20 19:08:56 +00:00
Add #ifndef IMGUI_DISABLE to all the backends #6601
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#6601
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version: all
Branch: all
Back-ends: all
Operating System: all
I'm disabling imgui by configuration, because I don't want to distribute my application with imgui. I'm using imgui for internal tools, so the Distribution build defines IMGUI_DISABLE, but I have to modify some backends in order to avoid compilation errors when compiling that configuration. I've tried ignoring the files in cmake with expressions like this:
set_source_files_properties(${backendSourceList} PROPERTIES HEADER_FILE_ONLY $<IF:$<CONFIG:Distribution>,TRUE,FALSE>)but set_source_files_properties doesn't allow generator expressions. So at the end I have to add
#ifndef IMGUI_DISABLEmanually to the backends I use. This is an inconvenience when I want to update imgui library.If anyone knows another way to achiveve this, please let me know.
Thanks.
Hello,
I am pretty sure this is something you can solve with your build system and that cmake can do this.
However for sake of completeness I don’t mind adding support for this in the backends.
Easy fix:
You can exclude the backend sources from the build without modifying them. If you want to control this with defines, you can just not add them to the project and instead include them in a redirector like this:
Modified all backends to support this:
33e13c8