Improved FindSFML.cmake to handle configurations in a better way (fixes issue #27)

This commit is contained in:
Laurent Gomila 2011-04-14 22:08:19 +02:00
parent fd0d18f12e
commit 6e04a02b07
7 changed files with 86 additions and 38 deletions

View file

@ -31,5 +31,4 @@ set(SRC
# define the csfml-audio target
csfml_add_library(csfml-audio
SOURCES ${SRC}
DEPENDS optimized ${SFML_AUDIO_LIBRARY} debug ${SFML_AUDIO_LIBRARY_DEBUG}
optimized ${SFML_SYSTEM_LIBRARY} debug ${SFML_SYSTEM_LIBRARY_DEBUG})
DEPENDS ${SFML_AUDIO_LIBRARY} ${SFML_SYSTEM_LIBRARY})

View file

@ -19,7 +19,7 @@ if(WINDOWS)
set(SFML_STATIC_LIBRARIES TRUE)
add_definitions(-DSFML_STATIC)
endif()
find_package(SFML 2 COMPONENTS system window network graphics audio REQUIRED)
find_package(SFML 2.0 COMPONENTS system window network graphics audio REQUIRED)
include_directories(${SFML_INCLUDE_DIR})
# add the modules subdirectories

View file

@ -43,6 +43,4 @@ set(SRC
# define the csfml-graphics target
csfml_add_library(csfml-graphics
SOURCES ${SRC}
DEPENDS optimized ${SFML_GRAPHICS_LIBRARY} debug ${SFML_GRAPHICS_LIBRARY_DEBUG}
optimized ${SFML_WINDOW_LIBRARY} debug ${SFML_WINDOW_LIBRARY_DEBUG}
optimized ${SFML_SYSTEM_LIBRARY} debug ${SFML_SYSTEM_LIBRARY_DEBUG})
DEPENDS ${SFML_GRAPHICS_LIBRARY} ${SFML_WINDOW_LIBRARY} ${SFML_SYSTEM_LIBRARY})

View file

@ -34,5 +34,4 @@ set(SRC
# define the csfml-network target
csfml_add_library(csfml-network
SOURCES ${SRC}
DEPENDS optimized ${SFML_NETWORK_LIBRARY} debug ${SFML_NETWORK_LIBRARY_DEBUG}
optimized ${SFML_SYSTEM_LIBRARY} debug ${SFML_SYSTEM_LIBRARY_DEBUG})
DEPENDS ${SFML_NETWORK_LIBRARY} ${SFML_SYSTEM_LIBRARY})

View file

@ -23,4 +23,4 @@ set(SRC
# define the csfml-system target
csfml_add_library(csfml-system
SOURCES ${SRC}
DEPENDS optimized ${SFML_SYSTEM_LIBRARY} debug ${SFML_SYSTEM_LIBRARY_DEBUG})
DEPENDS ${SFML_SYSTEM_LIBRARY})

View file

@ -23,5 +23,4 @@ set(SRC
# define the csfml-window target
csfml_add_library(csfml-window
SOURCES ${SRC}
DEPENDS optimized ${SFML_WINDOW_LIBRARY} debug ${SFML_WINDOW_LIBRARY_DEBUG}
optimized ${SFML_SYSTEM_LIBRARY} debug ${SFML_SYSTEM_LIBRARY_DEBUG})
DEPENDS ${SFML_WINDOW_LIBRARY} ${SFML_SYSTEM_LIBRARY})