mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
FindSFML.cmake now defines the SFML_STATIC macro when requesting static libraries
This commit is contained in:
parent
5b6c824773
commit
512a7c63cb
@ -12,6 +12,7 @@
|
|||||||
#
|
#
|
||||||
# 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
|
# 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.
|
||||||
@ -21,6 +22,11 @@
|
|||||||
# 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