LinuxCommandLibrary

sfdk-cmake

Configure SFDK projects using CMake

TLDR

Run cmake

$ sfdk cmake
copy

Run cmake in specified project directory
$ sfdk cmake [project]
copy

Run cmake with extra arguments
$ sfdk cmake -- [arguments]
copy

Run cmake build in current directory
$ sfdk cmake --build .
copy

Run cmake build in current directory with extra cmake arguments
$ sfdk cmake --build . [cmake-arguments]
copy

Run cmake build in current directory with extra build tool arguments
$ sfdk cmake --build . -- [build-tool-arguments]
copy

SYNOPSIS

sfdk-cmake [cmake_options]

PARAMETERS

-DCMAKE_BUILD_TYPE={Debug|Release}
    Specifies the build type (Debug or Release). This is a standard CMake option.

-DSFKD_DIR={path}
    Specifies the location of the SFDK installation directory.

...
    Any other CMake option can be passed through.

DESCRIPTION

The `sfdk-cmake` command is designed to simplify and streamline the process of building SFDK (Software Framework Development Kit) projects using the CMake build system. It provides a standardized approach to setting up the build environment, locating SFDK libraries and headers, and configuring project-specific settings. This command typically acts as a wrapper around the standard CMake commands, automating common tasks and ensuring consistency across different projects. By using `sfdk-cmake`, developers can avoid writing repetitive CMake code and focus on the core functionality of their SFDK applications. It helps manages dependencies, sets compiler flags, and performs other build-related tasks in a consistent manner. In essence, `sfdk-cmake` promotes a more efficient and maintainable development workflow for SFDK-based software.

CAVEATS

The exact functionality of `sfdk-cmake` depends heavily on the specific SFDK implementation and the scripts it provides. It's essential to consult the SFDK documentation for the correct usage and available options.

EXAMPLE USAGE

To configure a project for a Debug build, you might use:

sfdk-cmake -DCMAKE_BUILD_TYPE=Debug

To specify the SFDK directory:

sfdk-cmake -DSFKD_DIR=/opt/sfdk

SEE ALSO

cmake(1)

Copied to clipboard