feat: add model / texture cooking
This commit is contained in:
+14
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user