# ------------------------------------------------------------
#
#  Spectre main Cmake config
#
# ------------------------------------------------------------
cmake_minimum_required(VERSION 3.15)
cmake_policy(SET CMP0091 NEW)


# set the project name
project(Spectre
	VERSION 0.0.1
	DESCRIPTION ""
	HOMEPAGE_URL "")

set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake" )

include(GNUInstallDirs)

# Compiler
# -------------------------------

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_EXTENSIONS OFF)

if (MSVC)
	add_definitions("/EHsc -D_CRT_SECURE_NO_WARNINGS")

	# Staticly link with MSVCR
	set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif (MSVC)


#  Variables
# -------------------------------

# Include engine
include(engine.cmake)

# Include examples
add_subdirectory(examples)