Slightly improved/fixed example:
FIND_PACKAGE (
SFML
COMPONENTS system window graphics # audio network if you want
REQUIRED
)
INCLUDE_DIRECTORIES ( ${SFML_INCLUDE_DIR} )
...
TARGET_LINK_LIBRARIES (
myexe
optimized
${SFML_GRAPHICS_LIBRARY}
${SFML_WINDOW_LIBRARY}
${SFML_SYSTEM_LIBRARY}
debug
${SFML_GRAPHICS_LIBRARY_DEBUG}
${SFML_WINDOW_LIBRARY_DEBUG}
${SFML_SYSTEM_LIBRARY_DEBUG}
)
Options are explained at the beginning of the file (it's always like this with FindXxx.cmake files).