## IdeBuildTarget IdeBuildTarget |

## Functions

GFile * | ide_build_target_get_install_directory ()
gchar * | ide_build_target_get_name ()
gchar * | ide_build_target_get_display_name ()
gint | ide_build_target_get_priority ()
gchar ** | ide_build_target_get_argv ()
gchar * | ide_build_target_get_cwd ()
gchar * | ide_build_target_get_language ()
gboolean | ide_build_target_get_install ()
IdeArtifactKind | ide_build_target_get_kind ()
gboolean | ide_build_target_compare ()

## Types and Values

#define | IDE_TYPE_BUILD_TARGET
enum | IdeArtifactKind
struct | IdeBuildTargetInterface
| IdeBuildTarget

## Object Hierarchy

        GInterface
        ╰── IdeBuildTarget

## Prerequisites

IdeBuildTarget requires IdeObject.

## Known Implementations

IdeBuildTarget is implemented by IdeSimpleBuildTarget.

## Description

## Functions

### ide_build_target_get_install_directory ()

    GFile *
    ide_build_target_get_install_directory
                                   (IdeBuildTarget *self);

#### Returns

a GFile or `NULL`.

[nullable][transfer full]

Since: 3.32

### ide_build_target_get_name ()

    gchar *
    ide_build_target_get_name (IdeBuildTarget *self);

#### Returns

A filename or `NULL`.

[nullable][transfer full]

Since: 3.32

### ide_build_target_get_display_name ()

    gchar *
    ide_build_target_get_display_name (IdeBuildTarget *self);

#### Returns

A display name for the build target to be displayed in UI. May contain pango markup.

[nullable][transfer full]

Since: 3.32

### ide_build_target_get_priority ()

    gint
    ide_build_target_get_priority (IdeBuildTarget *self);

Gets the priority of the build target. This is used to sort build targets by their importance. The lowest value (negative values are allowed) will be run as the default run target by Builder.

#### Parameters

self | an IdeBuildTarget |

#### Returns

the priority of the build target

Since: 3.32

### ide_build_target_get_argv ()

    gchar **
    ide_build_target_get_argv (IdeBuildTarget *self);

Gets the arguments used to run the target.

#### Parameters

self | a IdeBuildTarget |

#### Returns

A GStrv containing the arguments to run the target.

[transfer full]

Since: 3.32

### ide_build_target_get_cwd ()

    gchar *
    ide_build_target_get_cwd (IdeBuildTarget *self);

For build systems and build target providers that insist to be run in a specific place, this method gets the correct working directory.

If this method returns `NULL`, the runtime will pick a default working directory for the spawned process (usually, the user home directory in the host system, or the flatpak sandbox home under flatpak).

#### Parameters

self | a IdeBuildTarget |

#### Returns

the working directory to use for this target.

[nullable][transfer full]

Since: 3.32

### ide_build_target_get_language ()

    gchar *
    ide_build_target_get_language (IdeBuildTarget *self);

Return the main programming language that was used to write this build target.

This method is primarily used to choose an appropriate debugger. Therefore, if a build target is composed of components in multiple language (eg. a GJS app with GObject Introspection libraries, or a Java app with JNI libraries), this should return the language that is most likely to be appropriate for debugging.

The default implementation returns "asm", which indicates an unspecified language that compiles to native code.

#### Parameters

self | a IdeBuildTarget |

#### Returns

the programming language of this target.

[transfer full]

Since: 3.32

### ide_build_target_get_install ()

    gboolean
    ide_build_target_get_install (IdeBuildTarget *self);

Checks if the IdeBuildTarget gets installed.

#### Parameters

self | an IdeBuildTarget |

#### Returns

`TRUE` if the build target is installed

Since: 3.32

### ide_build_target_get_kind ()

    IdeArtifactKind
    ide_build_target_get_kind (IdeBuildTarget *self);

Gets the kind of artifact.

#### Parameters

self | a IdeBuildTarget |

#### Returns

an IdeArtifactKind

Since: 3.32

### ide_build_target_compare ()

    gboolean
    ide_build_target_compare (const IdeBuildTarget *left,
                              const IdeBuildTarget *right);

## Types and Values

### IDE_TYPE_BUILD_TARGET

    #define IDE_TYPE_BUILD_TARGET (ide_build_target_get_type())

### enum IdeArtifactKind

#### Members

IDE_ARTIFACT_KIND_NONE |  |
IDE_ARTIFACT_KIND_EXECUTABLE |  |
IDE_ARTIFACT_KIND_SHARED_LIBRARY |  |
IDE_ARTIFACT_KIND_STATIC_LIBRARY |  |
IDE_ARTIFACT_KIND_FILE |  |

### struct IdeBuildTargetInterface

    struct IdeBuildTargetInterface {
      GTypeInterface parent_iface;

      GFile            *(*get_install_directory) (IdeBuildTarget *self);
      gchar            *(*get_name)              (IdeBuildTarget *self);
      gchar            *(*get_display_name)      (IdeBuildTarget *self);
      gint              (*get_priority)          (IdeBuildTarget *self);
      gchar           **(*get_argv)              (IdeBuildTarget *self);
      gchar            *(*get_cwd)               (IdeBuildTarget *self);
      gchar            *(*get_language)          (IdeBuildTarget *self);
      IdeArtifactKind   (*get_kind)              (IdeBuildTarget *self);
    };

### IdeBuildTarget

    typedef struct _IdeBuildTarget IdeBuildTarget;