Fix cmake/sfml version issue on Arch Linux.

This commit is contained in:
Jordan Woyak
2011-08-19 21:12:07 -05:00
parent 6bc81f5ac4
commit faf6ce6d85
2 changed files with 172 additions and 6 deletions

View File

@ -311,13 +311,16 @@ else(SDL_FOUND)
add_subdirectory(Externals/SDL)
endif(SDL_FOUND)
check_lib(SFML sfml-network SFML/Network/Ftp.hpp QUIET)
if(SFML_FOUND)
message("Using shared sfml-network")
set(SFML_FIND_VERSION TRUE)
set(SFML_FIND_VERSION_MAJOR 1)
set(SFML_FIND_VERSION_MINOR 5)
include(FindSFML OPTIONAL)
if(SFML_FOUND AND SFML_VERSION_OK AND (SFML_VERSION_MAJOR EQUAL 1))
message("Using shared SFML")
else()
message("Shared sfml-network not found, falling back to the static library")
add_subdirectory(Externals/SFML)
include_directories(Externals/SFML/include)
message("Shared (1.5 <= SFML < 2.0) not found, falling back to the static library")
add_subdirectory(Externals/SFML)
include_directories(Externals/SFML/include)
endif()
check_lib(SOIL SOIL SOIL/SOIL.h QUIET)