Here is what works:
Project CMakeLists.txtcmake_minimum_required (VERSION 3.17)
project (games VERSION 0.0.1)
set(CMAKE_C_COMPILER "clang.exe")
set(CMAKE_CXX_COMPILER "clang++.exe")
add_subdirectory (SFML)
add_subdirectory (hello-world)
hello-sfml CMakeLists.txtadd_executable (hello-sfml hello-sfml.cpp)
target_link_libraries (hello-sfml
sfml-system
sfml-window
sfml-graphics
)
Building from command line:$ cmake .. -DCMAKE_BUILD_TYPE=DEBUG -DEXPORT_COMPILE_COMMANDS=ON -DBUILD_SHARED_LIBS=OFF -G Ninja
$ ninja hello-sfml