diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 3b44a3d..0e3be49 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -15,13 +15,16 @@ jobs: strategy: matrix: - build_type: ["Debug", "RelWithDebInfo", "Release"] + build_type: + - { value: "Debug", profile: "debug" } + - { value: "RelWithDebInfo", profile: "relwithdebinfo" } + - { value: "Release", profile: "release" } unity_build: ["ON", "OFF"] conan_profile: ["./ConanProfiles/host/clang", "./ConanProfiles/host/clang_asan"] variant: - { value: "True", name: "toolmode" } - { value: "False", name: "game" } - name: "Build & Test ${{ matrix.build_type }} with ${{ matrix.conan_profile }} (Unity Build: ${{ matrix.unity_build }}, Variant: ${{ matrix.variant.name }})" + name: "Build & Test ${{ matrix.build_type.value }} with ${{ matrix.conan_profile }} (Unity Build: ${{ matrix.unity_build }}, Variant: ${{ matrix.variant.name }})" steps: - name: Install Node.js run: apt-get update && apt-get install -y nodejs @@ -33,18 +36,18 @@ jobs: - name: Build run: | - conan install . --remote=bigfootpackages -pr:h=${{ matrix.conan_profile }} -pr:b=./ConanProfiles/build/clang --build=missing -s build_type=${{ matrix.build_type }} -o bigfoot/*:build_tests=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:tracy=False -o bigfoot/*:vulkan=True -o bigfoot/*:toolmode=${{ matrix.variant.value }} -of build-${{ matrix.variant.name }} - . ./build-${{ matrix.variant.name }}/build/${{ matrix.build_type }}/generators/conanbuild.sh - cmake -S . -B ./build-${{ matrix.variant.name }}/${{ matrix.build_type }} --toolchain ./build-${{ matrix.variant.name }}/build/${{ matrix.build_type }}/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_UNITY_BUILD=${{ matrix.unity_build }} -G "Ninja" - cmake --build build-${{ matrix.variant.name }}/${{ matrix.build_type }} --parallel $(nproc) - . ./build-${{ matrix.variant.name }}/build/${{ matrix.build_type }}/generators/deactivate_conanbuild.sh + conan install . --remote=bigfootpackages -pr:h=${{ matrix.conan_profile }} -pr:h=./ConanProfiles/Configurations/${{ matrix.build_type.profile }} -pr:b=./ConanProfiles/build/clang -pr:b=./ConanProfiles/Configurations/${{ matrix.build_type.profile }} --build=missing -o bigfoot/*:build_tests=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:tracy=False -o bigfoot/*:vulkan=True -o bigfoot/*:toolmode=${{ matrix.variant.value }} -of build-${{ matrix.variant.name }} + . ./build-${{ matrix.variant.name }}/build/${{ matrix.build_type.value }}/generators/conanbuild.sh + cmake -S . -B ./build-${{ matrix.variant.name }}/${{ matrix.build_type.value }} --toolchain ./build-${{ matrix.variant.name }}/build/${{ matrix.build_type.value }}/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type.value }} -DCMAKE_UNITY_BUILD=${{ matrix.unity_build }} -G "Ninja" + cmake --build build-${{ matrix.variant.name }}/${{ matrix.build_type.value }} --parallel $(nproc) + . ./build-${{ matrix.variant.name }}/build/${{ matrix.build_type.value }}/generators/deactivate_conanbuild.sh - name: Unit Tests run: | - cd ./build-${{ matrix.variant.name }}/${{ matrix.build_type }} - . ../../build-${{ matrix.variant.name }}/build/${{ matrix.build_type }}/generators/conanbuild.sh + cd ./build-${{ matrix.variant.name }}/${{ matrix.build_type.value }} + . ../../build-${{ matrix.variant.name }}/build/${{ matrix.build_type.value }}/generators/conanbuild.sh xvfb-run ctest . --output-on-failure - . ../../build-${{ matrix.variant.name }}/build/${{ matrix.build_type }}/generators/deactivate_conanbuild.sh + . ../../build-${{ matrix.variant.name }}/build/${{ matrix.build_type.value }}/generators/deactivate_conanbuild.sh clang-format: runs-on: ubuntu-latest diff --git a/Bigfoot/Libs/Graphics/GraphicsInterface/Include/GraphicsInterface/GraphicsSurface.hpp b/Bigfoot/Libs/Graphics/GraphicsInterface/Include/GraphicsInterface/GraphicsSurface.hpp index 72d93c1..b757f2f 100644 --- a/Bigfoot/Libs/Graphics/GraphicsInterface/Include/GraphicsInterface/GraphicsSurface.hpp +++ b/Bigfoot/Libs/Graphics/GraphicsInterface/Include/GraphicsInterface/GraphicsSurface.hpp @@ -19,8 +19,8 @@ #ifdef BIGFOOT_WINDOWS #include #elif defined BIGFOOT_LINUX -#include -#include +struct wl_display; +struct wl_surface; #endif namespace Bigfoot @@ -34,8 +34,8 @@ struct SurfaceCreateInfo HWND m_windowHandle = nullptr; HINSTANCE m_windowInstance = nullptr; #elif defined BIGFOOT_LINUX - Display* m_display = nullptr; - Window m_window = 0; + wl_display* m_display = nullptr; + wl_surface* m_surface = nullptr; #endif }; diff --git a/Bigfoot/Libs/Graphics/GraphicsVulkan/CMakeLists.txt b/Bigfoot/Libs/Graphics/GraphicsVulkan/CMakeLists.txt index 2120d98..ad716eb 100644 --- a/Bigfoot/Libs/Graphics/GraphicsVulkan/CMakeLists.txt +++ b/Bigfoot/Libs/Graphics/GraphicsVulkan/CMakeLists.txt @@ -23,5 +23,5 @@ target_compile_definitions(${PackageName} PRIVATE VULKAN_HPP_NO_EXCEPTIONS PRIVATE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1 PRIVATE $<$:VK_USE_PLATFORM_WIN32_KHR> - PRIVATE $<$:VK_USE_PLATFORM_XLIB_KHR> + PRIVATE $<$:VK_USE_PLATFORM_WAYLAND_KHR> PUBLIC BIGFOOT_VULKAN) diff --git a/Bigfoot/Libs/Graphics/GraphicsVulkan/Include/GraphicsVulkan/VulkanInclude.hpp b/Bigfoot/Libs/Graphics/GraphicsVulkan/Include/GraphicsVulkan/VulkanInclude.hpp index 6b41fc4..438e828 100644 --- a/Bigfoot/Libs/Graphics/GraphicsVulkan/Include/GraphicsVulkan/VulkanInclude.hpp +++ b/Bigfoot/Libs/Graphics/GraphicsVulkan/Include/GraphicsVulkan/VulkanInclude.hpp @@ -10,14 +10,4 @@ #define VULKAN_HPP_ASSERT_ON_RESULT(result) #include -#ifdef VK_USE_PLATFORM_XLIB_KHR -#undef None -#undef Always -#undef Success -#undef True -#undef False -#undef Bool -#undef Status -#endif - #endif diff --git a/Bigfoot/Libs/Graphics/GraphicsVulkan/VulkanInstance.cpp b/Bigfoot/Libs/Graphics/GraphicsVulkan/VulkanInstance.cpp index 5c5521c..9c15c24 100644 --- a/Bigfoot/Libs/Graphics/GraphicsVulkan/VulkanInstance.cpp +++ b/Bigfoot/Libs/Graphics/GraphicsVulkan/VulkanInstance.cpp @@ -76,7 +76,7 @@ VulkanInstance::VulkanInstance(const eastl::string_view p_applicationName, const eastl::vector enabledLayers; eastl::vector enabledExtensions { VK_KHR_SURFACE_EXTENSION_NAME, - BIGFOOT_WINDOWS_OR_LINUX(VK_KHR_WIN32_SURFACE_EXTENSION_NAME, VK_KHR_XLIB_SURFACE_EXTENSION_NAME)}; + BIGFOOT_WINDOWS_OR_LINUX(VK_KHR_WIN32_SURFACE_EXTENSION_NAME, VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME)}; #ifdef BIGFOOT_NOT_OPTIMIZED const vk::ResultValue> availableLayers = vk::enumerateInstanceLayerProperties(); diff --git a/Bigfoot/Libs/Graphics/GraphicsVulkan/VulkanSurface.cpp b/Bigfoot/Libs/Graphics/GraphicsVulkan/VulkanSurface.cpp index 1ebf7fa..725de49 100644 --- a/Bigfoot/Libs/Graphics/GraphicsVulkan/VulkanSurface.cpp +++ b/Bigfoot/Libs/Graphics/GraphicsVulkan/VulkanSurface.cpp @@ -20,8 +20,8 @@ VulkanSurface::VulkanSurface(const VulkanInstance& p_instance, const SurfaceCrea p_surfaceCreateInfo.m_windowHandle}; const vk::ResultValue surface = m_instance.GetHandle().createWin32SurfaceKHR(createInfo); #elif defined BIGFOOT_LINUX - const vk::XlibSurfaceCreateInfoKHR createInfo {{}, p_surfaceCreateInfo.m_display, p_surfaceCreateInfo.m_window}; - const vk::ResultValue surface = m_instance.GetHandle().createXlibSurfaceKHR(createInfo); + const vk::WaylandSurfaceCreateInfoKHR createInfo {{}, p_surfaceCreateInfo.m_display, p_surfaceCreateInfo.m_surface}; + const vk::ResultValue surface = m_instance.GetHandle().createWaylandSurfaceKHR(createInfo); #endif CRITICAL_ASSERT(GraphicsVulkanAssertHandler, diff --git a/Bigfoot/Tests/Graphics/GraphicsCore/CMakeLists.txt b/Bigfoot/Tests/Graphics/GraphicsCore/CMakeLists.txt index e530c94..5a2714f 100644 --- a/Bigfoot/Tests/Graphics/GraphicsCore/CMakeLists.txt +++ b/Bigfoot/Tests/Graphics/GraphicsCore/CMakeLists.txt @@ -1,8 +1,7 @@ get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME) project(${PackageName}Tests) -set(Dependencies - glfw) +set(Dependencies) set(BigfootDependencies) bigfoot_create_package_tests( diff --git a/Bigfoot/Tests/Graphics/GraphicsVulkan/CMakeLists.txt b/Bigfoot/Tests/Graphics/GraphicsVulkan/CMakeLists.txt index e530c94..3bda171 100644 --- a/Bigfoot/Tests/Graphics/GraphicsVulkan/CMakeLists.txt +++ b/Bigfoot/Tests/Graphics/GraphicsVulkan/CMakeLists.txt @@ -2,7 +2,7 @@ get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME) project(${PackageName}Tests) set(Dependencies - glfw) + SDL3::SDL3) set(BigfootDependencies) bigfoot_create_package_tests( diff --git a/Bigfoot/Tests/Graphics/GraphicsVulkan/VulkanSurface.cpp b/Bigfoot/Tests/Graphics/GraphicsVulkan/VulkanSurface.cpp index 54ef827..afdfb96 100644 --- a/Bigfoot/Tests/Graphics/GraphicsVulkan/VulkanSurface.cpp +++ b/Bigfoot/Tests/Graphics/GraphicsVulkan/VulkanSurface.cpp @@ -10,15 +10,7 @@ #include -#define GLFW_INCLUDE_NONE -#include - -#ifdef BIGFOOT_WINDOWS -#define GLFW_EXPOSE_NATIVE_WIN32 -#elif defined BIGFOOT_LINUX -#define GLFW_EXPOSE_NATIVE_X11 -#endif -#include +#include #include namespace Bigfoot::Vulkan @@ -28,30 +20,32 @@ class VulkanSurfaceFixture: public ::testing::Test protected: void SetUp() override { - ASSERT_EQ(glfwInit(), GLFW_TRUE); + SDL_Init(SDL_INIT_VIDEO); - glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); - glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); - m_window = glfwCreateWindow(64, 64, "VulkanSurfaceTests", nullptr, nullptr); - ASSERT_NE(m_window, nullptr); + m_window = SDL_CreateWindow("VulkanSurfaceTests", 64, 64, SDL_WINDOW_HIDDEN | SDL_WINDOW_VULKAN); + + const SDL_PropertiesID windowProperties = SDL_GetWindowProperties(m_window); #ifdef BIGFOOT_WINDOWS - m_surfaceCreateInfo.m_windowHandle = glfwGetWin32Window(m_window); + m_surfaceCreateInfo.m_windowHandle = + static_cast(SDL_GetPointerProperty(windowProperties, SDL_PROP_WINDOW_WIN32_HWND_POINTER, nullptr)); m_surfaceCreateInfo.m_windowInstance = GetModuleHandle(nullptr); #elif defined BIGFOOT_LINUX - m_surfaceCreateInfo.m_display = glfwGetX11Display(); - m_surfaceCreateInfo.m_window = glfwGetX11Window(m_window); + m_surfaceCreateInfo.m_display = static_cast( + SDL_GetPointerProperty(windowProperties, SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER, nullptr)); + m_surfaceCreateInfo.m_surface = static_cast( + SDL_GetPointerProperty(windowProperties, SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER, nullptr)); #endif } void TearDown() override { - glfwDestroyWindow(m_window); - glfwTerminate(); + SDL_DestroyWindow(m_window); + SDL_Quit(); } VulkanInstance m_instance {"VulkanSurfaceTests", Version {1, 0, 0}}; - GLFWwindow* m_window = nullptr; + SDL_Window* m_window = nullptr; SurfaceCreateInfo m_surfaceCreateInfo; }; diff --git a/CMake/FindDependencies.cmake b/CMake/FindDependencies.cmake index f3908b7..e288f47 100644 --- a/CMake/FindDependencies.cmake +++ b/CMake/FindDependencies.cmake @@ -42,7 +42,7 @@ endif() if(BUILD_TESTS) find_package(GTest REQUIRED) find_package(pixelmatch-cpp17 REQUIRED) - find_package(glfw3 REQUIRED) + find_package(SDL3 REQUIRED) endif() if(BUILD_BENCHMARKS) diff --git a/ConanProfiles/Configurations/debug b/ConanProfiles/Configurations/debug new file mode 100644 index 0000000..4738c7d --- /dev/null +++ b/ConanProfiles/Configurations/debug @@ -0,0 +1,2 @@ +[settings] +build_type=Debug diff --git a/ConanProfiles/Configurations/release b/ConanProfiles/Configurations/release new file mode 100644 index 0000000..e3d01f6 --- /dev/null +++ b/ConanProfiles/Configurations/release @@ -0,0 +1,5 @@ +[settings] +build_type=Release + +[conf] +tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/../Toolchains/ipo.ini diff --git a/ConanProfiles/Configurations/relwithdebinfo b/ConanProfiles/Configurations/relwithdebinfo new file mode 100644 index 0000000..965658a --- /dev/null +++ b/ConanProfiles/Configurations/relwithdebinfo @@ -0,0 +1,2 @@ +[settings] +build_type=RelWithDebInfo diff --git a/ConanProfiles/build/clang b/ConanProfiles/build/clang index ff4b135..b6d4fc5 100644 --- a/ConanProfiles/build/clang +++ b/ConanProfiles/build/clang @@ -7,11 +7,9 @@ compiler.libcxx=libstdc++11 compiler.cppstd=20 compiler.cstd=17 compiler.runtime=static -build_type=Release [conf] tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake -tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/../Toolchains/ipo.ini tools.system.package_manager:mode=install tools.system.package_manager:sudo=True @@ -21,4 +19,4 @@ tools.build:compiler_executables={"c": "clang", "cpp": "clang++"} tools.info.package_id:confs=["tools.build:cflags$", "tools.build:cxxflags$", "tools.build:defines$", "tools.build:sharedlinkflags$", "tools.build:exelinkflags$", "tools.build:compiler_executables$", "tools.cmake.cmaketoolchain:user_toolchain$", "tools.meson.mesontoolchain:extra_machine_files$"] [tool_requires] -!cmake/*: cmake/4.3.2 \ No newline at end of file +!cmake/*: cmake/4.3.2 diff --git a/ConanProfiles/build/msvc b/ConanProfiles/build/msvc index 7dde8e4..c6403ad 100644 --- a/ConanProfiles/build/msvc +++ b/ConanProfiles/build/msvc @@ -6,11 +6,9 @@ compiler.version=195 compiler.cppstd=20 compiler.cstd=17 compiler.runtime=static -build_type=Release [conf] tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake -tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/../Toolchains/ipo.ini tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"] tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope"] @@ -20,4 +18,4 @@ tools.env.virtualenv:powershell=powershell.exe tools.info.package_id:confs=["tools.build:cflags$", "tools.build:cxxflags$", "tools.build:defines$", "tools.build:sharedlinkflags$", "tools.build:exelinkflags$", "tools.build:compiler_executables$", "tools.cmake.cmaketoolchain:user_toolchain$", "tools.meson.mesontoolchain:extra_machine_files$"] [tool_requires] -!cmake/*: cmake/4.3.2 \ No newline at end of file +!cmake/*: cmake/4.3.2 diff --git a/ConanProfiles/host/Common/clang b/ConanProfiles/host/Common/clang index 33d5fbd..0a6e08d 100644 --- a/ConanProfiles/host/Common/clang +++ b/ConanProfiles/host/Common/clang @@ -20,5 +20,5 @@ tools.info.package_id:confs=["tools.build:cflags$", "tools.build:cxxflags$", "to [tool_requires] !cmake/*: cmake/4.3.2 -!mold/*: mold/2.41.0@bigfootdev/main +!(mold/*|zlib/*|xxhash/*): mold/2.42.1@bigfootdev/main !ninja/*: ninja/1.13.2 diff --git a/ConanProfiles/host/clang b/ConanProfiles/host/clang index 6bf0597..cdaca41 100644 --- a/ConanProfiles/host/clang +++ b/ConanProfiles/host/clang @@ -1,12 +1,8 @@ include(Common/clang) -[settings] -build_type=Release - [conf] tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/mold.cmake tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake -tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/../Toolchains/ipo.ini tools.build:cxxflags=["-fno-exceptions", "-fno-rtti"] diff --git a/ConanProfiles/host/msvc b/ConanProfiles/host/msvc index 2fc8f45..0d8e731 100644 --- a/ConanProfiles/host/msvc +++ b/ConanProfiles/host/msvc @@ -1,14 +1,10 @@ include(Common/msvc) -[settings] -build_type=Release - [conf] tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake -tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/../Toolchains/ipo.ini tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"] -tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:externConstexpr", "/Zc:lambda", "/Zc:throwingNew", "/volatile:iso", "/EHs-c-", "/GR-"] +tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope"] [options] bigfoot/*:build_tests=True diff --git a/conanfile.py b/conanfile.py index 2706512..b023264 100644 --- a/conanfile.py +++ b/conanfile.py @@ -60,7 +60,33 @@ class Bigfoot(ConanFile): if(self.options.vulkan): self.options["spirv-cross"].exceptions = False - + + if(self.options.build_tests): + # Bigfoot only uses SDL for windowing/Vulkan surface creation, so every other + # subsystem (audio, input devices, sensors, SDL's own 2D/GPU renderers, etc.) is + # unneeded; "video" and "vulkan" are the only subsystems left at their default True. + self.options["sdl"].audio = False + self.options["sdl"].joystick = False + self.options["sdl"].haptic = False + self.options["sdl"].hidapi = False + self.options["sdl"].power = False + self.options["sdl"].sensor = False + self.options["sdl"].camera = False + self.options["sdl"].gpu = False + self.options["sdl"].render = False + self.options["sdl"].dialog = False + self.options["sdl"].tray = False + self.options["sdl"].opengl = False + self.options["sdl"].opengles = False + + if(self.settings.os == "Linux"): + self.options["sdl"].x11 = False + self.options["sdl"].dbus = False + self.options["sdl"].libudev = False + + if(self.settings.os == "Windows"): + self.options["sdl"].directx = False + def build_requirements(self): self.tool_requires("bin2cpp/1.0.0@bigfootdev/main") @@ -93,7 +119,7 @@ class Bigfoot(ConanFile): if(self.options.build_tests): self.test_requires("gtest/1.18.0") self.test_requires("pixelmatch-cpp17/1.0.3@bigfootdev/main") - self.test_requires("glfw/3.4") + self.test_requires("sdl/3.4.14") if(self.options.build_benchmarks): self.requires("benchmark/1.9.5") diff --git a/generate_bigfoot.bat b/generate_bigfoot.bat index cf89f2d..0b627c0 100644 --- a/generate_bigfoot.bat +++ b/generate_bigfoot.bat @@ -1,7 +1,7 @@ @echo off setlocal enabledelayedexpansion -REM ─── Validate argument ─────────────────────────────────────────────────────── +REM --- Validate argument --------------------------------------------------- if "%~1"=="force" set "build_option=--build=*" & goto :start if "%~1"=="missing" set "build_option=--build=missing" & goto :start @@ -11,7 +11,7 @@ echo missing - Only build packages not already cached exit /b 1 :start -REM ─── Register remote (skip if already registered) ──────────────────────────── +REM --- Register remote (skip if already registered) ------------------------ conan remote list | findstr /i "bigfootpackages" >nul 2>&1 if errorlevel 1 ( echo Adding Conan remote: bigfootpackages @@ -24,17 +24,20 @@ if errorlevel 1 ( echo Conan remote 'bigfootpackages' already registered, skipping. ) -REM ─── Shared flags ──────────────────────────────────────────────────────────── +REM --- Shared flags ----------------------------------------------------------- set "conan_common_base=--remote=bigfootpackages -pr:h=./ConanProfiles/host/msvc -pr:b=./ConanProfiles/build/msvc -o bigfoot/*:build_tests=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:tracy=True -o bigfoot/*:vulkan=True" -REM ─── Install dependencies for each build type/variant ──────────────────────── +REM --- Install dependencies for each build type/variant ----------------------- for %%C in (Release RelWithDebInfo Debug) do ( echo. echo [%%C] Installing dependencies... + if "%%C"=="Release" set "config_profile=release" + if "%%C"=="RelWithDebInfo" set "config_profile=relwithdebinfo" + if "%%C"=="Debug" set "config_profile=debug" for %%V in (toolmode game) do ( set "toolmode_val=False" if "%%V"=="toolmode" set "toolmode_val=True" - conan install . !conan_common_base! -of build-windows-%%V -o bigfoot/*:toolmode=!toolmode_val! %build_option% -s:h build_type=%%C + conan install . !conan_common_base! -of build-windows-%%V -o bigfoot/*:toolmode=!toolmode_val! %build_option% -pr:h=./ConanProfiles/Configurations/!config_profile! -pr:b=./ConanProfiles/Configurations/!config_profile! if errorlevel 1 ( echo ERROR: conan install failed for build type %%C ^(%%V^) exit /b 1 @@ -46,7 +49,7 @@ for %%C in (Release RelWithDebInfo Debug) do ( echo. echo All build types installed successfully. -REM ─── Activate build environment and run CMake ──────────────────────────────── +REM --- Activate build environment and run CMake -------------------------------- echo. echo Activating build environment and configuring CMake... diff --git a/generate_bigfoot.sh b/generate_bigfoot.sh index 0a5bff7..e2139a9 100644 --- a/generate_bigfoot.sh +++ b/generate_bigfoot.sh @@ -79,11 +79,12 @@ conan_common_game=( for build_type in "${build_types[@]}"; do echo echo "[${build_type}] Installing dependencies..." - if ! conan install . "${conan_common_toolmode[@]}" ${build_option} -s:h "build_type=${build_type}"; then + build_type_profile="./ConanProfiles/Configurations/${build_type,,}" + if ! conan install . "${conan_common_toolmode[@]}" ${build_option} -pr:h="${build_type_profile}" -pr:b="${build_type_profile}"; then echo "ERROR: conan install failed for build type ${build_type}" exit 1 fi - if ! conan install . "${conan_common_game[@]}" ${build_option} -s:h "build_type=${build_type}"; then + if ! conan install . "${conan_common_game[@]}" ${build_option} -pr:h="${build_type_profile}" -pr:b="${build_type_profile}"; then echo "ERROR: conan install failed for build type ${build_type}" exit 1 fi