20,741
edits
| Line 39: | Line 39: | ||
== Example: disabling PUI == | == Example: disabling PUI == | ||
{{Main article|Developing using CMake}} | {{Main article|Developing using CMake}} | ||
We should add separate build options to explicitly disable certain features individually, e.g.: | |||
* <code>-DDISABLE_PUI</code> | |||
* <code>-DDISABLE_2DPANELS</code> | |||
Successfully disabling a feature means primarily: | |||
* adding a corresponding new build option to the top-level CMakeLists.txt (e.g. DISABLE_PUI) | |||
* opening fg_init.cxx and navigating to the lines where the feature/subsystem is initialized | |||
* wrapping the corresponding code in between <code>#ifdef...#endif</code> blocks | |||
* locating any remaining references to the subsystem in question and repeating the last step there | |||
Knowing that [[PUI]] contains legacy OpenGL code and knowing it's scheduled to be removed anyway because it isn't compatible with modern OpenGL, we will disable it completely without | Knowing that [[PUI]] contains legacy OpenGL code and knowing it's scheduled to be removed anyway because it isn't compatible with modern OpenGL, we will disable it completely without | ||
| Line 127: | Line 137: | ||
This will ensure that fgcommands that are PUI related won't be available in a non-PUI build. | This will ensure that fgcommands that are PUI related won't be available in a non-PUI build. | ||
== Affected Features / Sources == | == Affected Features / Sources == | ||