mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
FindSFML.cmake now defines the SFML_STATIC macro when requesting static libraries
This commit is contained in:
parent
5b6c824773
commit
512a7c63cb
@ -11,16 +11,22 @@
|
|||||||
# - SFML_INCLUDE_DIR, the path where SFML headers are located (the directory containing the SFML/Config.hpp file)
|
# - SFML_INCLUDE_DIR, the path where SFML headers are located (the directory containing the SFML/Config.hpp file)
|
||||||
#
|
#
|
||||||
# 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.
|
||||||
# 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.
|
# On Mac OS X if SFML_STATIC_LIBRARIES is not set to TRUE then by default CMake will search for frameworks unless
|
||||||
# Moreover, keep in mind that SFML frameworks are only available as release libraries unlike dylibs which
|
# 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
|
||||||
# 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 variable or environment variable
|
||||||
# to tell CMake where SFML is.
|
# to tell CMake where SFML is.
|
||||||
|
|
||||||
|
# define the SFML_STATIC macro if static build was chosen
|
||||||
|
if(SFML_STATIC_LIBRARIES)
|
||||||
|
add_definitions(-DSFML_STATIC)
|
||||||
|
endif()
|
||||||
|
|
||||||
# deduce the libraries suffix from the options
|
# deduce the libraries suffix from the options
|
||||||
set(FIND_SFML_LIB_SUFFIX "")
|
set(FIND_SFML_LIB_SUFFIX "")
|
||||||
if(SFML_STATIC_LIBRARIES)
|
if(SFML_STATIC_LIBRARIES)
|
||||||
|
Loading…
Reference in New Issue
Block a user