33 lines
867 B
C++
33 lines
867 B
C++
#include "helper.h"
|
|
#include "c.h"
|
|
#include "ld.h"
|
|
#include "tier1/utlstring.h"
|
|
#include "tier1/commandline.h"
|
|
|
|
CUtlVector<CUtlString> MaterialSystem_CompiledFiles = {
|
|
"materialsystem/materialsystem.cpp",
|
|
"materialsystem/vulkan/rendercontext.cpp",
|
|
"materialsystem/vulkan/material.cpp",
|
|
"external/volk/volk.c",
|
|
};
|
|
CUtlString material_lib;
|
|
|
|
DECLARE_BUILD_STAGE(MaterialSystem)
|
|
{
|
|
CProject_t compileProject = {};
|
|
LinkProject_t ldProject = {};
|
|
|
|
compileProject.m_szName = "MaterialSystem";
|
|
compileProject.files = MaterialSystem_CompiledFiles;
|
|
compileProject.includeDirectories = all_IncludeDirectories;
|
|
compileProject.bFPIC = true;
|
|
ldProject = ccompiler->Compile(&compileProject);
|
|
ldProject.linkType = ELINK_STATIC_LIBRARY;
|
|
ldProject.libraries = { "vulkan" };
|
|
|
|
CUtlString outputProject = linker->Link(&ldProject);
|
|
material_lib = outputProject;
|
|
|
|
return 0;
|
|
}
|