-
-
Notifications
You must be signed in to change notification settings - Fork 2
Customising Your Build
The following CMake build options and their default values are listed here if you'd like to tweak the build process:
BUILD_TESTS ON Build tests (does not automatically run them).
BUILD_DEFS ON Auto-generate C/C++ headers and documentation.
RUN_ANYWHERE OFF Build a framework that can run from any folder without installation.
PARASOL_INSTALL ON Create installation targets. If OFF, the build won't install anything.
INSTALL_EXAMPLES OFF Install the example scripts.
INSTALL_INCLUDES OFF Install the header files.
INSTALL_TESTS OFF Install the test programs.
ENABLE_ANALYSIS OFF Enable run-time address analysis if available. Incompatible with gdb.
Parasol is built as a series of APIs such as 'core', 'display', 'network' and 'vector'. Each API is compiled as an individual component. A default system build compiles the APIs as shared libraries, as it prevents scripts and programs from loading unnecessary features.
If you're using Parasol for a specific run-time application that you're developing, you probably want a static build so that the framework is embedded with your application. In addition, you can choose each specific API needed for your program - so if you didn't need networking, that entire category of features can be switched off for faster compilation and a smaller binary.
To enable a static build, use the -DPARASOL_STATIC=ON
build option. Your program's cmake file should link to the framework with target_link_libraries (your_program PRIVATE ${INIT_LINK})
.
To choose the API's that you need, see the next section.
By default, every available API will be compiled in the framework unless they are individually switched off. You can disable a given API with -DDISABLE_<API_NAME>=TRUE
, where <API_NAME>
is one of the following choices:
AUDIO Audio API
DISPLAY Display API
DOCUMENT Document API Dependent on Display, Vector, Font
FONT Font API Dependent on Display
HTTP HTTP API Dependent on Network
MP3 MP3 support Dependent on Audio
NETWORK Network API
PICTURE Picture API Dependent on Display
JPEG JPEG support Dependent on Picture
SCINTILLA Scintilla API Dependent on Display, Vector, Font
SVG SVG support Dependent on Display, Vector, Font
VECTOR Vector API Dependent on Display, Font
If you disable an API that has child dependencies, the dependent APIs will not be included in the build. For instance, disabling Network will also result in HTTP being disabled.
A default build will not only produce compiled binaries, but additional assets such as fonts, icons, UI scripts and utilities. These are considered standard items and their deletion may have unintended consequences - for instance removing certain fonts could impact UI presentation. We don't provide the ability to disable them for that reason, but if a build needs to be trimmed further then we suggest a post-build script to remove unwanted assets in a targeted manner.