Files
Bigfoot/conanfile.py
Romain BOULLARD 6c8979684d
Some checks failed
Bigfoot / Sonarqube (push) Has been cancelled
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Release (Unity Build: ON) (push) Has been cancelled
Bigfoot / Clang Format Checks (push) Has been cancelled
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Has been cancelled
StaticAnalysis (#6)
Reviewed-on: #6
Co-authored-by: Romain BOULLARD <romain.boullard@protonmail.com>
Co-committed-by: Romain BOULLARD <romain.boullard@protonmail.com>
2026-01-30 15:46:40 +00:00

124 lines
4.6 KiB
Python

from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout
from conan.tools.files import copy
import os
required_conan_version = ">=1.33.0"
class Bigfoot(ConanFile):
name = "bigfoot"
homepage = "https://git.romainboullard.com/BigfootDev/Bigfoot"
description = "Bigfoot is a 3D game engine written in C++"
topics = ("game engine", "3d")
license = "MIT"
version = "0.1.0"
# Binary configuration
settings = "os", "compiler", "build_type", "arch"
options = {
"shared": [True, False],
"fPIC": [True, False],
"build_tests": [True, False],
"tracy": [True, False],
"build_tools": [True, False],
"vulkan": [True, False],
"build_benchmarks": [True, False],
}
default_options = {
"shared": False,
"fPIC": True,
"build_tests": False,
"tracy": False,
"build_tools": True,
"vulkan": True,
"build_benchmarks": False,
}
generators = "CMakeDeps"
def layout(self):
cmake_layout(self)
def configure(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options['mimalloc'].override = True
self.options['mimalloc'].shared = True
if(self.settings.os == "Windows"):
self.options["mimalloc"].win_redirect = True
self.options['stduuid'].with_cxx20_span = True
self.options['flatbuffers'].header_only = True
if(self.options.tracy):
self.options["tracy"].on_demand = True
if(self.options.vulkan):
self.options["spirv-cross"].exceptions = False
if(self.options.build_benchmarks):
self.options["benchmark"].enable_exceptions = False
self.options["benchmark"].enable_lto = True
def requirements(self):
self.requires("eastl/3.27.01@bigfootdev/main", transitive_headers=True)
self.requires("unordered_dense/4.8.1@bigfootdev/main", transitive_headers=True)
self.requires("mimalloc/3.1.5@bigfootdev/main", transitive_headers=True)
self.requires("stduuid/1.2.3@bigfootdev/main", transitive_headers=True)
self.requires("sqlite3/3.51.0@bigfootdev/main", transitive_headers=True)
self.requires("cli11/2.6.0")
self.requires("rapidhash/3.0@bigfootdev/main", transitive_headers=True)
self.requires("effolkronium-random/1.5.0", transitive_headers=True)
self.requires("flatbuffers/25.12.19@bigfootdev/main", transitive_headers=True)
if(self.settings.build_type == "RelWithDebInfo" or self.settings.build_type == "Debug"):
self.requires("quill/11.0.2", transitive_headers=True)
self.requires("cpptrace/1.0.4", transitive_headers=True)
if(self.options.tracy):
self.requires("tracy/0.12.2", transitive_headers=True)
self.requires("glm/1.0.1", transitive_headers=True)
self.requires("lodepng/cci.20250727@bigfootdev/main", transitive_headers=True)
self.requires("imgui/1.92.5-docking", transitive_headers=True)
if(self.options.vulkan):
self.requires("vulkan-headers/1.4.313.0")
if(self.settings.build_type == "RelWithDebInfo" or self.settings.build_type == "Debug"):
self.requires("vulkan-validationlayers/1.4.313.0@bigfootdev/main")
self.requires("vulkan-memory-allocator/3.3.0@bigfootdev/main")
if(self.options.build_tests or self.options.build_benchmarks):
self.requires("glfw/3.4")
if(self.options.build_tests):
self.test_requires("gtest/1.17.0")
self.test_requires("pixelmatch-cpp17/1.0.3@bigfootdev/main")
if(self.options.build_tools):
self.requires("spirv-cross/1.4.313.0")
self.requires("shaderc/2025.3@bigfootdev/main")
self.requires("stb/cci.20240531", override=True)
self.requires("assimp/6.0.2")
self.requires("meshoptimizer/1.0@bigfootdev/main")
self.requires("libsquish/1.15")
if(self.options.build_benchmarks):
self.requires("benchmark/1.9.4")
def generate(self):
tc = CMakeToolchain(self)
tc.variables["BUILD_TESTS"] = self.options.build_tests
tc.variables["TRACY"] = self.options.tracy
tc.variables["BUILD_TOOLS"] = self.options.build_tools
tc.variables["VULKAN"] = self.options.vulkan
tc.variables["BUILD_BENCHMARKS"] = self.options.build_benchmarks
tc.generate()
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()