2019-06-06 17:07:24 +02:00
|
|
|
cmake_minimum_required(VERSION 3.14)
|
2019-06-06 21:30:39 +02:00
|
|
|
project(project_maat)
|
2019-06-06 17:07:24 +02:00
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
|
|
|
|
|
|
|
|
add_subdirectory(src)
|
|
|
|
add_subdirectory(tests)
|
2019-06-11 00:33:44 +02:00
|
|
|
add_subdirectory(game)
|
2019-06-06 17:07:24 +02:00
|
|
|
|
|
|
|
# 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()
|
|
|
|
|
2019-06-11 00:33:44 +02:00
|
|
|
# Detect and add TGUI
|
|
|
|
find_package(TGUI REQUIRED)
|
|
|
|
if(NOT TGUI_FOUND)
|
|
|
|
message(FATAL_ERROR "SFML could not be found")
|
|
|
|
endif()
|
|
|
|
|
2019-06-06 17:07:24 +02:00
|
|
|
# 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()
|