from conan import ConanFile
from conan.tools.cmake import cmake_layout, CMake


class TownEngine(ConanFile):
    settings = 'os', 'compiler', 'build_type', 'arch'
    generators = 'CMakeToolchain', 'CMakeDeps'

    def requirements(self):
        self.requires('sdl/2.30.7')

    def build_requirements(self):
        self.tool_requires('cmake/3.22.6')

    def layout(self):
        cmake_layout(self)

    def build(self):
        cmake = CMake(self)
        cmake.configure()
        cmake.build()
