-
-
Notifications
You must be signed in to change notification settings - Fork 5
Project compilation mode modifiers
Compilation mode modifiers are compilation options that modify the way the project is compiled in some way.
By default, BUILD_VARIANT_STATIC
is left to OFF
. When set to ON
all shared libraries are converted to static ones,
including the framework and project libraries.
When set to OFF
the behaviour is the following:
- Any platform
- Shared
yaml-cpp
- Shared
freetype
- Any other library is compiled statically
- Shared
- Unix systems
- Shared Framework library
- Shared Application library
- Application executable
- Windows systems
- Shared Framework library
- Application executable
Meanwhile, when set to ON
:
- Any platform - All libraries are compiled statically
- Unix systems - Framework, Application and Executable are compiled into the executable
- Windows systems - Framework and Executable are compiled into the executable
To enable it, use the CMake CLI like this:
cmake .. -DBUILD_VARIANT_STATIC=ON
or hardcode the CMakeLists.txt
file where the following line:
option(BUILD_VARIANT_STATIC "Builds the Framework, application library(exists only on Unix) and executable into a single
executable binary" OFF)
should look like this:
option(BUILD_VARIANT_STATIC "Builds the Framework, application library(exists only on Unix) and executable into a single
executable binary" ON)
Additionally, to be able to export to production in static mode, overriding the default setting in the
uvproj.yaml
file is also needed. By default, it should look like this:
name: "MyApplication"
version: "1.0.0.0"
engine-version: "1.0.0.0"
build-mode-static: false
build-mode-vendor: true
Changing the build-mode-static
field, enabled/disables static mode
When enabled, the UIMGUI_BUILD_VARIANT_STATIC
macro is defined.
The BUILD_VARIANT_VENDOR
option allows the user to change which libraries the framework and application uses when
compiling. By default, it is set to ON
, which will use the framework's vendored third party libraries,
otherwise it will search for the system equivalents.
Some libraries may be vendored even if system equivalents are there. In most cases, this is due to code incompatibility between the last release version and latest commit version. The following libraries are always vendored:
- No libraries right now!
* This wiki will be updated when a library is moved to an "always-vendored" state.
Note
Setting vendored mode to OFF
is not supported on Windows. Changes to the setting will not take effect.
To enable it, use the CMake CLI like this:
cmake .. -DBUILD_VARIANT_VENDOR=ON
or hardcode the CMakeLists.txt
file where the following line:
option(BUILD_VARIANT_VENDOR "If set to OFF will use the globally installed framework(not available on Windows)" ON)
should look like this:
option(BUILD_VARIANT_VENDOR "If set to OFF will use the globally installed framework(not available on Windows)" OFF)
Additionally, to be able to export to production in vendor mode, overriding the default setting in the uvproj.yaml
file is also needed. By default, it should look like this:
name: "MyApplication"
version: "1.0.0.0"
engine-version: "1.0.0.0"
build-mode-static: false
build-mode-vendor: true
Changing the build-mode-vendor
field, enabled/disables static mode
When enabled, the UIMGUI_BUILD_VARIANT_VENDOR
macro is enabled.
This project is supported by all the people who joined our discord server and became beta testers. If you want to join the discord you can click here.
- Home
- Beginner content
- Install guide
- Creating and using the UI components
- The Instance
- The Init Info struct
- Textures
- Logging
- Unicode support
- Additional features
- Client-side bar
- Custom type definitions
- Memory management
- C API development
- Config files and Folders
- Interfaces
- Internal Event safety
- Customising the build system
- Modules system
- Collaborating with others
- Advanced content
- Developer and contributor resources
- Misc