4.5.4. Runtime-loaded dynamic module (plugin) (loadable-module)¶
Runtime-loaded dynamic module (plugin).
4.5.4.1. Properties¶
basename (type: string)
Base name of the loadable module.
This is not full filename or even path, it’s only its base part, to which platform-specific prefix and/or extension are added. By default, it’s the same as target’s ID, but it can be changed e.g. if the filename should contain version number, which would be impractical to use as target identifier in the bakefile.
loadable-module myplugin { basename = myplugin-v1; }Default: $(id)
Inheritable from parent: no
extension (type: string)
File extension of the module, including the leading dot.
By default, native extension for shared libraries (e.g. “.dll” on Windows) is used.
loadable-module excel_plugin { extension = .xll; }Default: null
Inheritable from parent: no
sources (type: list of paths)
Source files.
Default: empty
Inheritable from parent: no
headers (type: list of paths)
Header files.
Default: empty
Inheritable from parent: no
defines (type: list of strings)
List of preprocessor macros to define.
Default: empty
Inheritable from parent: yes
includedirs (type: list of paths)
Directories where to look for header files.
Default: empty
Inheritable from parent: yes
warnings (type: warnings)
Warning level for the compiler.
Use
no
to completely disable warning,minimal
to show only the most important warning messages orall
to enable all warnings.Default: default
Allowed values: “no”, “minimal”, “default”, “all”
Inheritable from parent: yes
compiler-options (type: list of strings)
Additional compiler options common to all C-like compilers (C, C++, Objective-C, Objective-C++).
Note that the options are compiler-specific and so this property should only be set conditionally for particular compilers that recognize the options.
Default: empty
Inheritable from parent: yes
c-compiler-options (type: list of strings)
Additional options for C compiler.
Note that the options are compiler-specific and so this property should only be set conditionally for particular compilers that recognize the options.
Default: empty
Inheritable from parent: yes
cxx-compiler-options (type: list of strings)
Additional options for C++ compiler.
Note that the options are compiler-specific and so this property should only be set conditionally for particular compilers that recognize the options.
Default: empty
Inheritable from parent: yes
libs (type: list of strings)
Additional libraries to link with.
Do not use this property to link with libraries built as part of your project; use deps for that.
When this list is non-empty on a Static library (library), it will be used when linking executables that use the library.
Default: empty
Inheritable from parent: yes
libdirs (type: list of paths)
Additional directories where to look for libraries.
When this list is non-empty on a Static library (library), it will be used when linking executables that use the library.
Default: empty
Inheritable from parent: yes
link-options (type: list of strings)
Additional linker options.
Note that the options are compiler/linker-specific and so this property should only be set conditionally for particular compilers that recognize the options.
When this list is non-empty on a Static library (library), it will be used when linking executables that use the library.
Default: empty
Inheritable from parent: yes
archs (type: list of architectures)
Architectures to compile for.
Adds support for building binaries for specified architectures, if supported by the toolset. Support may take the form of either multi-arch binaries (OS X) or additional build configurations (Visual Studio).
The default empty value means to do whatever the default behavior of the toolset is.
Currently only supported on OS X and in Visual Studio.
Default: null
Allowed values: “x86”, “x86_64”
Inheritable from parent: yes
win32-crt-linkage (type: linkage)
How to link against the C Runtime Library.
If
dll
(the default), the executable may depend on some DLLs provided by the compiler. Ifstatic
then a static version of the CRT is linked directly into the executable.Default: dll
Allowed values: “static”, “dll”
Inheritable from parent: yes
win32-unicode (type: bool)
Compile win32 code in Unicode mode? If enabled,
_UNICODE
symbol is defined and the wide character entry point (WinMain
, …) is used.Default: True
Inheritable from parent: yes
outputdir (type: path)
Directory where final binaries are put.
Note that this is not the directory for intermediate files such as object files – these are put in
@builddir
. By default, output location is the same,@builddir
, but can be overwritten to for example put all executables intobin/
subdirectory.Default: @builddir/
Inheritable from parent: yes
pic (type: bool)
Compile position-independent code.
By default, libraries (both shared and static, because the latter could be linked into a shared lib too) are linked with -fPIC and executables are not.
Default: None
Inheritable from parent: yes
multithreading (type: bool)
Enable support for multithreading.
MT support is enabled by default, but can be disabled when not needed.
On Unix, this option causes the use of pthreads library. Visual Studio always uses MT-safe CRT, even if this setting is disabled.
Default: True
Inheritable from parent: yes
id (type: id)
Target’s unique name (ID).
Read-only property
Inheritable from parent: no
deps (type: list of ids)
Dependencies of the target (list of IDs).
The dependencies are handled in target-specific ways. At the very least, they are added to the list of dependencies in generated makefiles or projects to ensure correct build order. Some targets may be smart about some kinds of the dependencies and do more.
In particular, compiled targets (executables, DLLs) will automatically link against all libraries found in deps.
Default: empty
Inheritable from parent: no
pre-build-commands (type: list of strings)
Custom commands to run before building the target.
The value is a list of shell commands to run. Notice that the commands are platform-specific and so typically need to be set conditionally depending on the value of
toolset
.Currently only implemented by Visual Studio.
Default: empty
Inheritable from parent: no
post-build-commands (type: list of strings)
Custom commands to run after building the target.
The value is a list of shell commands to run. Notice that the commands are platform-specific and so typically need to be set conditionally depending on the value of
toolset
.Currently only implemented by Visual Studio.
Default: empty
Inheritable from parent: no
configurations (type: list of strings)
List of configurations to use for this target.
See Build configurations for more information.
Default: Debug Release
Inheritable from parent: yes
vs2008.projectfile (type: path)
File name of the project for the target.
Only for toolsets: Visual Studio 2008 (vs2008)
Default:
$(id).vcxproj
in the same directory as the.sln
fileInheritable from parent: no
vs2008.guid (type: string)
GUID of the project.
Only for toolsets: Visual Studio 2008 (vs2008)
Default: automatically generated
Inheritable from parent: no
vs2005.projectfile (type: path)
File name of the project for the target.
Only for toolsets: Visual Studio 2005 (vs2005)
Default:
$(id).vcxproj
in the same directory as the.sln
fileInheritable from parent: no
vs2005.guid (type: string)
GUID of the project.
Only for toolsets: Visual Studio 2005 (vs2005)
Default: automatically generated
Inheritable from parent: no
vs2012.projectfile (type: path)
File name of the project for the target.
Only for toolsets: Visual Studio 2012 (vs2012)
Default:
$(id).vcxproj
in the same directory as the.sln
fileInheritable from parent: no
vs2012.guid (type: string)
GUID of the project.
Only for toolsets: Visual Studio 2012 (vs2012)
Default: automatically generated
Inheritable from parent: no
vs2013.projectfile (type: path)
File name of the project for the target.
Only for toolsets: Visual Studio 2013 (vs2013)
Default:
$(id).vcxproj
in the same directory as the.sln
fileInheritable from parent: no
vs2013.guid (type: string)
GUID of the project.
Only for toolsets: Visual Studio 2013 (vs2013)
Default: automatically generated
Inheritable from parent: no
vs2003.projectfile (type: path)
File name of the project for the target.
Only for toolsets: Visual Studio 2003 (vs2003)
Default:
$(id).vcxproj
in the same directory as the.sln
fileInheritable from parent: no
vs2003.guid (type: string)
GUID of the project.
Only for toolsets: Visual Studio 2003 (vs2003)
Default: automatically generated
Inheritable from parent: no
vs2010.projectfile (type: path)
File name of the project for the target.
Only for toolsets: Visual Studio 2010 (vs2010)
Default:
$(id).vcxproj
in the same directory as the.sln
fileInheritable from parent: no
vs2010.guid (type: string)
GUID of the project.
Only for toolsets: Visual Studio 2010 (vs2010)
Default: automatically generated
Inheritable from parent: no