cmake_minimum_required(VERSION 3.14) project(src) set(CMAKE_CXX_STANDARD 17) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH}) add_subdirectory(src) add_subdirectory(tests) # Detect and add SFML find_package(SFML COMPONENTS system window graphics network audio REQUIRED) if(NOT SFML_FOUND) message(FATAL_ERROR "SFML could not be found") endif() # Detect and add GTest find_package(GTest REQUIRED) if(GTest_FOUND) enable_testing() else() message(FATAL_ERROR "GTest could not be found") endif() # Find PugiXML find_path(PugiXML_INCLUDE_DIR pugixml.hpp) if(NOT IS_DIRECTORY ${PugiXML_INCLUDE_DIR}) message(FATAL_ERROR "PugiXML could not be found") endif()