mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Improved the documentation of FindSFML.cmake
This commit is contained in:
parent
511032460a
commit
be7bcae823
@ -1,26 +1,54 @@
|
|||||||
# Locate the SFML library
|
# This script locates the SFML library
|
||||||
|
# ------------------------------------
|
||||||
#
|
#
|
||||||
# This module defines the following variables:
|
# Usage
|
||||||
# - For each module XXX (SYSTEM, WINDOW, GRAPHICS, NETWORK, AUDIO, MAIN):
|
# -----
|
||||||
# - SFML_XXX_LIBRARY_DEBUG, the name of the debug library of the xxx module (set to SFML_XXX_LIBRARY_RELEASE is no debug version is found)
|
#
|
||||||
# - SFML_XXX_LIBRARY_RELEASE, the name of the release library of the xxx module (set to SFML_XXX_LIBRARY_DEBUG is no release version is found)
|
# When you try to locate the SFML libraries, you must specify which modules you want to use (system, window, graphics, network, audio, main).
|
||||||
# - SFML_XXX_LIBRARY, the name of the library to link to for the xxx module (includes both debug and optimized names if necessary)
|
# If none is given, the SFML_LIBRARIES variable will be empty and you'll end up linking to nothing.
|
||||||
# - SFML_XXX_FOUND, true if either the debug or release library of the xxx module is found
|
# example:
|
||||||
# - SFML_LIBRARIES, the list of all libraries corresponding to the required modules
|
# find_package(SFML COMPONENTS system window graphics) // find the system, graphics and window modules
|
||||||
# - SFML_FOUND, true if all the required modules are found
|
#
|
||||||
# - SFML_INCLUDE_DIR, the path where SFML headers are located (the directory containing the SFML/Config.hpp file)
|
# You can enforce a specific version, either MAJOR.MINOR or only MAJOR.
|
||||||
|
# If nothing is specified, the version won't be checked (ie. any version will be accepted).
|
||||||
|
# example:
|
||||||
|
# find_package(SFML COMPONENTS ...) // no specific version required
|
||||||
|
# find_package(SFML 2 COMPONENTS ...) // any 2.x version
|
||||||
|
# find_package(SFML 2.4 COMPONENTS ...) // version 2.4 or greater
|
||||||
#
|
#
|
||||||
# By default, the dynamic libraries of SFML will be found. To find the static ones instead,
|
# By default, the dynamic libraries of SFML will be found. To find the static ones instead,
|
||||||
# you must set the SFML_STATIC_LIBRARIES variable to TRUE before calling find_package(SFML ...).
|
# you must set the SFML_STATIC_LIBRARIES variable to TRUE before calling find_package(SFML ...).
|
||||||
# In case of static linking, the SFML_STATIC macro will also be defined by this script.
|
# In case of static linking, the SFML_STATIC macro will also be defined by this script.
|
||||||
|
# example:
|
||||||
|
# set(SFML_STATIC_LIBRARIES TRUE)
|
||||||
|
# find_package(SFML 2 COMPONENTS system network)
|
||||||
#
|
#
|
||||||
# On Mac OS X if SFML_STATIC_LIBRARIES is not set to TRUE then by default CMake will search for frameworks unless
|
# On Mac OS X if SFML_STATIC_LIBRARIES is not set to TRUE then by default CMake will search for frameworks unless
|
||||||
# CMAKE_FIND_FRAMEWORK is set to "NEVER" for example. Please refer to CMake documentation for more details.
|
# CMAKE_FIND_FRAMEWORK is set to "NEVER" for example. Please refer to CMake documentation for more details.
|
||||||
# Moreover, keep in mind that SFML frameworks are only available as release libraries unlike dylibs which
|
# Moreover, keep in mind that SFML frameworks are only available as release libraries unlike dylibs which
|
||||||
# are available for both release and debug modes.
|
# are available for both release and debug modes.
|
||||||
#
|
#
|
||||||
# If SFML is not installed in a standard path, you can use the SFMLDIR CMake variable or environment variable
|
# If SFML is not installed in a standard path, you can use the SFMLDIR CMake (or environment) variable
|
||||||
# to tell CMake where SFML is.
|
# to tell CMake where SFML is.
|
||||||
|
#
|
||||||
|
# Output
|
||||||
|
# ------
|
||||||
|
#
|
||||||
|
# This script defines the following variables:
|
||||||
|
# - For each specified module XXX (system, window, graphics, network, audio, main):
|
||||||
|
# - SFML_XXX_LIBRARY_DEBUG: the name of the debug library of the xxx module (set to SFML_XXX_LIBRARY_RELEASE is no debug version is found)
|
||||||
|
# - SFML_XXX_LIBRARY_RELEASE: the name of the release library of the xxx module (set to SFML_XXX_LIBRARY_DEBUG is no release version is found)
|
||||||
|
# - SFML_XXX_LIBRARY: the name of the library to link to for the xxx module (includes both debug and optimized names if necessary)
|
||||||
|
# - SFML_XXX_FOUND: true if either the debug or release library of the xxx module is found
|
||||||
|
# - SFML_LIBRARIES: the list of all libraries corresponding to the required modules
|
||||||
|
# - SFML_FOUND: true if all the required modules are found
|
||||||
|
# - SFML_INCLUDE_DIR: the path where SFML headers are located (the directory containing the SFML/Config.hpp file)
|
||||||
|
#
|
||||||
|
# example:
|
||||||
|
# find_package(SFML 2 COMPONENTS system window graphics audio REQUIRED)
|
||||||
|
# include_directories(${SFML_INCLUDE_DIR})
|
||||||
|
# add_executable(myapp ...)
|
||||||
|
# target_link_libraries(myapp ${SFML_LIBRARIES})
|
||||||
|
|
||||||
# define the SFML_STATIC macro if static build was chosen
|
# define the SFML_STATIC macro if static build was chosen
|
||||||
if(SFML_STATIC_LIBRARIES)
|
if(SFML_STATIC_LIBRARIES)
|
||||||
|
Loading…
Reference in New Issue
Block a user