FindSDL_gfx

在 3.25 版被加入.

Finds the SDL_gfx library that provides graphics support in SDL (Simple DirectMedia Layer) applications:

find_package(SDL_gfx [<version>] [...])

備註

This module is for SDL_gfx version 1. For version 2 or newer usage refer to the upstream documentation.

Imported Targets

This module provides the following Imported Targets:

SDL::SDL_gfx

Target encapsulating the SDL_gfx library usage requirements, available if SDL_gfx is found.

結果變數

該模組定義了以下變數:

SDL_gfx_FOUND

Boolean indicating whether the (requested version of) SDL_gfx library was found.

SDL_gfx_VERSION

在 4.2 版被加入.

The human-readable string containing the version of SDL_gfx found.

快取變數

The following cache variables may also be set:

SDL_GFX_INCLUDE_DIRS

The directory containing the headers needed to use SDL_gfx.

SDL_GFX_LIBRARIES

The path to the SDL_gfx library needed to link against to use SDL_gfx.

提示

This module accepts the following variables:

SDLDIR

Environment variable that can be set to help locate an SDL library installed in a custom location. It should point to the installation destination that was used when configuring, building, and installing SDL library: ./configure --prefix=$SDLDIR.

已棄用的變數

The following variables are provided for backward compatibility:

SDL_GFX_FOUND

在 4.2 版之後被棄用: Use SDL_gfx_FOUND, which has the same value.

Boolean indicating whether the (requested version of) SDL_gfx library was found.

SDL_GFX_VERSION_STRING

在 4.2 版之後被棄用: Use the SDL_gfx_VERSION.

The human-readable string containing the version of SDL_gfx found.

範例

Finding SDL_gfx library and linking it to a project target:

find_package(SDL_gfx)
target_link_libraries(project_target PRIVATE SDL::SDL_gfx)

另請參見

  • The FindSDL module to find the main SDL library.