ExternalProject_Add(SFML_Debug_Shared
  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source/sfml
  #DOWNLOAD_COMMAND ""
  GIT_REPOSITORY "https://github.com/alexaut/sfml"
  GIT_TAG "91089ad24cca0198b108b472c305a2947d58ecab"
  UPDATE_COMMAND ""
  CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug
             -DBUILD_SHARED_LIBS=ON
             -DSFML_BUILD_AUDIO=OFF
             -DSFML_BUILD_GRAPHICS=OFF
             -DSFML_BUILD_NETWORK=ON
             -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/bin/${CMAKE_SYSTEM_NAME}
             -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
             ${OS_ARGS}
)

ExternalProject_Add(SFML_Debug_Static
  DEPENDS SFML_Debug_Shared
  DOWNLOAD_COMMAND ""
  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source/sfml
  CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug
             -DBUILD_SHARED_LIBS=OFF
             -DSFML_BUILD_AUDIO=OFF
             -DSFML_BUILD_GRAPHICS=OFF
             -DSFML_BUILD_NETWORK=ON
             -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/bin/${CMAKE_SYSTEM_NAME}
             -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
             ${OS_ARGS}
)

ExternalProject_Add(SFML_Release_Shared
  DEPENDS SFML_Debug_Shared
  DOWNLOAD_COMMAND ""
  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source/sfml
  CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release
             -DBUILD_SHARED_LIBS=ON
             -DSFML_BUILD_AUDIO=OFF
             -DSFML_BUILD_GRAPHICS=OFF
             -DSFML_BUILD_NETWORK=ON
             -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/bin/${CMAKE_SYSTEM_NAME}
             -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
             ${OS_ARGS}
)

ExternalProject_Add(SFML_Release_Static
  DEPENDS SFML_Debug_Shared
  DOWNLOAD_COMMAND ""
  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source/sfml
  CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release
             -DBUILD_SHARED_LIBS=OFF
             -DSFML_BUILD_AUDIO=OFF
             -DSFML_BUILD_GRAPHICS=OFF
             -DSFML_BUILD_NETWORK=ON
             -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/bin/${CMAKE_SYSTEM_NAME}
             -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
             ${OS_ARGS}
)
