Build target (build_tgt extends (追記) tgt (追記ここまで))

A build target is either an executable, shared library, static library, both shared and static library or shared module.

Extended by

Build target is extended by the following subtypes:

Returned by

Build target objects are returned by the following functions and methods:

Build target methods

build_tgt.extract_all_objects()

Acts the same as extract_objects, but returns all object files generated by this target.

By default only objects built for this target are returned to maintain backward compatibility with previous versions. The default value for the recursive kwarg will eventually be changed to true in a future version.

Signature

# Acts the same as `extract_objects`, but returns all object files generated
(追記) extracted_obj (追記ここまで) extract_all_objects(
 recursive : (追記) bool (追記ここまで) # Also return objects passed to the `objects` argument of this target
)

Arguments

The method build_tgt.extract_all_objects() accepts the following keyword arguments:

Name Type Description Tags
recursive (追記) bool (追記ここまで)

Also return objects passed to the objects argument of this target.

(since 0.46.0)

default = true


build_tgt.extract_objects()

Returns an opaque value representing the object files generated for those source files. This is typically used to take single object files and link them to unit tests or to compile some source files with custom flags. To use the object file(s) in another build target, use the objects: keyword argument to a (追記) build_target() (追記ここまで) or (追記) declare_dependency() (追記ここまで), or include them in the command line of a (追記) custom_target() (追記ここまで).

Signature

# Returns an opaque value representing the object files generated for those
(追記) extracted_obj (追記ここまで) extract_objects(
 (追記) str (追記ここまで) | (追記) file (追記ここまで) source..., # Source filenames for which the built objects should be extracted
)

Arguments

The method accepts between 1 and infinity variadic arguments (source...) of type (追記) str (追記ここまで) | (追記) file (追記ここまで) .

Source filenames for which the built objects should be extracted.


build_tgt.found()

Always returns true. This function is meant to make executables objects feature compatible with (追記) program (追記ここまで) objects. This simplifies use-cases where an executable is used instead of an (追記) program (追記ここまで).

Signature

(since 0.59.0)

(追記) bool (追記ここまで) found()

build_tgt.full_path()

Returns a full path pointing to the result target file. NOTE: In most cases using the object itself will do the same job as this and will also allow Meson to setup inter-target dependencies correctly. Please file a bug if that doesn't work for you.

Signature

(追記) str (追記ここまで) full_path()

build_tgt.name()

Returns the name of the target.

Signature

(since 0.54.0)

(追記) str (追記ここまで) name()

build_tgt.path()

Does the exact same as (追記) build_tgt.full_path() (追記ここまで). NOTE: This function is solely kept for compatibility with (追記) program (追記ここまで) objects. It will be removed once the, also deprecated, corresponding path() function in the (追記) program (追記ここまで) object is removed.

Signature

(since 0.59.0)

DEPRECATED

in 0.59.0

(追記) str (追記ここまで) path()

build_tgt.private_dir_include()

Returns a value that works like (追記) include_directories() (追記ここまで), but points to the private directory of this target. Usually only needed if an another target needs to access some generated internal headers of this target.

Signature

(追記) inc (追記ここまで) private_dir_include()

build_tgt.vala_gir()

Returns a (追記) file (追記ここまで) object pointing to a GIR file generated by the vala compiler, if this target does not generate a GIR file then it is an error to call this method.

Signature

(since 1.10.0)

(追記) file (追記ここまで) vala_gir()

build_tgt.vala_header()

Returns a (追記) file (追記ここまで) object pointing to a C compatible header generated by the vala compiler, if this target does not generate a vala header then it is an error to call this method.

Signature

(since 1.10.0)

(追記) file (追記ここまで) vala_header()

build_tgt.vala_vapi()

Returns a (追記) file (追記ここまで) object pointing to a VAPI header generated by the vala compiler, if this target does not generate a VAPI file then it is an error to call this method.

Signature

(since 1.10.0)

(追記) file (追記ここまで) vala_vapi()

The results of the search are

AltStyle によって変換されたページ (->オリジナル) /