diff --git a/CMake/CustomTargets.cmake b/CMake/CustomTargets.cmake index f2a4862..ada8bd5 100644 --- a/CMake/CustomTargets.cmake +++ b/CMake/CustomTargets.cmake @@ -17,4 +17,6 @@ target_compile_definitions(BigfootCompileAndLinkFlags INTERFACE $<$:BIGFOOT_LINUX> $<$:BIGFOOT_OPTIMIZED> $<$:BIGFOOT_NOT_OPTIMIZED> - $,BIGFOOT_TOOLMODE,BIGFOOT_GAME>) \ No newline at end of file + $,BIGFOOT_TOOLMODE,BIGFOOT_GAME> + $<$:BIGFOOT_BUILD_TESTS> + $<$:BIGFOOT_BUILD_BENCHMARKS>) \ No newline at end of file diff --git a/CMake/FindDependencies.cmake b/CMake/FindDependencies.cmake index adee80c..e8f3d6e 100644 --- a/CMake/FindDependencies.cmake +++ b/CMake/FindDependencies.cmake @@ -19,6 +19,10 @@ find_package(rapidhash REQUIRED) find_package(effolkronium_random REQUIRED) find_package(fmt REQUIRED) find_package(flatbuffers CONFIG REQUIRED) +find_package(lyra REQUIRED) +find_package(glm REQUIRED) +find_package(lodepng REQUIRED) +find_package(imgui REQUIRED) if(TRACY) find_package(Tracy REQUIRED) @@ -30,10 +34,6 @@ elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug" OR ${CMAKE_BUILD_TYPE} STREQUAL "Rel find_package(quill REQUIRED) endif() -find_package(glm REQUIRED) -find_package(lodepng REQUIRED) -find_package(imgui REQUIRED) - if(VULKAN) find_package(VulkanHeaders REQUIRED) find_package(vulkan-memory-allocator REQUIRED) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e3e300..3ac58d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,16 @@ cmake_minimum_required(VERSION 3.26) -project(Bigfoot VERSION 0.1.0 +# Probe project to load the toolchain file (which sets TOOLMODE) before the +# real project() call decides between the tool and game solution names. +project(BigfootProbe LANGUAGES NONE) + +if(NOT DEFINED TOOLMODE OR TOOLMODE) + set(BIGFOOT_PROJECT_NAME BigfootTool) +else() + set(BIGFOOT_PROJECT_NAME BigfootGame) +endif() + +project(${BIGFOOT_PROJECT_NAME} VERSION 0.1.0 DESCRIPTION "The Bigfoot engine" LANGUAGES CXX) diff --git a/conanfile.py b/conanfile.py index a65bc14..11a4c44 100644 --- a/conanfile.py +++ b/conanfile.py @@ -73,6 +73,10 @@ class Bigfoot(ConanFile): self.requires("effolkronium-random/1.5.0", transitive_headers=True) self.requires("fmt/12.2.0", transitive_headers=True) self.requires("flatbuffers/25.12.19-2026-02-06-03fffb2-bigfoot@bigfootdev/main", transitive_headers=True) + self.requires("glm/1.0.3", transitive_headers=True) + self.requires("lodepng/cci.20260210@bigfootdev/main", transitive_headers=True) + self.requires("imgui/1.92.9b-docking", transitive_headers=True) + self.requires("lyra/1.8.0", transitive_headers=True) if(self.settings.build_type == "RelWithDebInfo" or self.settings.build_type == "Debug"): self.requires("quill/12.1.0", transitive_headers=True) @@ -80,10 +84,6 @@ class Bigfoot(ConanFile): if(self.options.tracy): self.requires("tracy/0.13.1", transitive_headers=True) - self.requires("glm/1.0.3", transitive_headers=True) - self.requires("lodepng/cci.20260210@bigfootdev/main", transitive_headers=True) - self.requires("imgui/1.92.9b-docking", transitive_headers=True) - if(self.options.vulkan): self.requires("vulkan-headers/1.4.341.0@bigfootdev/main", override=True) self.requires("vulkan-memory-allocator/3.3.0@bigfootdev/main") @@ -97,7 +97,8 @@ class Bigfoot(ConanFile): def generate(self): tc = CMakeToolchain(self) - + tc.presets_prefix = "bigfoot-tool" if self.options.toolmode else "bigfoot-game" + tc.variables["ASAN"] = self.options.asan tc.variables["COVERAGE"] = self.options.coverage tc.variables["BUILD_TESTS"] = self.options.build_tests