feat: add model / texture cooking

This commit is contained in:
2026-10-13 00:28:34 +02:00
parent 38230f5092
commit 0273340e3b
6 changed files with 249 additions and 21 deletions
+14 -1
View File
@@ -3,7 +3,7 @@ add_executable(TheChef
"ShaderCompiler.h" "ShaderCompiler.cpp"
)
target_compile_features(TheChef PRIVATE cxx_std_17)
target_compile_features(TheChef PRIVATE cxx_std_20)
# Good practice for tools
target_compile_definitions(TheChef PRIVATE
@@ -45,6 +45,19 @@ add_subdirectory(third_party/glslang)
target_link_libraries(TheChef PRIVATE nlohmann_json::nlohmann_json spdlog::spdlog glslang glslang-default-resource-limits)
# Model cooking needs the engine's asset types, so it's only available when built inside Destrum
if (TARGET destrum::assets)
target_sources(TheChef PRIVATE "ModelCooker.h" "ModelCooker.cpp")
target_link_libraries(TheChef PRIVATE destrum::assets)
target_compile_definitions(TheChef PRIVATE THECHEF_MODEL_COOKING)
endif()
if (TARGET destrum::assets AND TARGET tinyexr)
target_sources(TheChef PRIVATE "TextureCooker.h" "TextureCooker.cpp")
target_link_libraries(TheChef PRIVATE destrum::assets tinyexr)
target_compile_definitions(TheChef PRIVATE THECHEF_TEXTURE_COOKING)
endif()
# Optional: warnings
if (MSVC)
target_compile_options(TheChef PRIVATE /W4)