Merge branch 'master' of github.com:LaurentGomila/SFML
This commit is contained in:
commit
ac43b8a4cf
@ -80,7 +80,13 @@ find_path(SFML_INCLUDE_DIR SFML/Config.hpp
|
||||
set(SFML_VERSION_OK TRUE)
|
||||
if(SFML_FIND_VERSION AND SFML_INCLUDE_DIR)
|
||||
# extract the major and minor version numbers from SFML/Config.hpp
|
||||
FILE(READ "${SFML_INCLUDE_DIR}/SFML/Config.hpp" SFML_CONFIG_HPP_CONTENTS)
|
||||
# we have to handle framework a little bit differently :
|
||||
if("${SFML_INCLUDE_DIR}" MATCHES "SFML.framework")
|
||||
set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/Headers/Config.hpp")
|
||||
else()
|
||||
set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/SFML/Config.hpp")
|
||||
endif()
|
||||
FILE(READ "${SFML_CONFIG_HPP_INPUT}" SFML_CONFIG_HPP_CONTENTS)
|
||||
STRING(REGEX MATCH ".*#define SFML_VERSION_MAJOR ([0-9]+).*#define SFML_VERSION_MINOR ([0-9]+).*" SFML_CONFIG_HPP_CONTENTS "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
STRING(REGEX REPLACE ".*#define SFML_VERSION_MAJOR ([0-9]+).*" "\\1" SFML_VERSION_MAJOR "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
STRING(REGEX REPLACE ".*#define SFML_VERSION_MINOR ([0-9]+).*" "\\1" SFML_VERSION_MINOR "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
|
Loading…
Reference in New Issue
Block a user