r5sdk/r5dev/materialsystem/CMakeLists.txt
Kawe Mazidjatari b84cfc2760 Optimize CMaterialSystem::Init() for dedicated
Hook 'CMaterialSystem::Init()', and only load the 'startup.rpak' file, as that's all we need. This pak file might also not even be needed on the server, but removing this requires rebuilding 'common_early.rpak' to drop all texture/material assets and their references. The dedicated server is now also linked to a newly added 'No-DirectX' version of the materialsystem for patching.
2023-07-17 11:54:14 +02:00

40 lines
877 B
CMake

cmake_minimum_required( VERSION 3.16 )
add_module( "lib" "materialsystem" "vpc" ${FOLDER_CONTEXT} TRUE TRUE )
start_sources()
add_sources( SOURCE_GROUP "Private"
"cmaterialglue.cpp"
"cmaterialglue.h"
"cmaterialsystem.cpp"
"cmaterialsystem.h"
"cshaderglue.cpp"
"cshaderglue.h"
)
add_sources( SOURCE_GROUP "Public"
"${ENGINE_SOURCE_DIR}/public/imaterial.h"
"${ENGINE_SOURCE_DIR}/public/imaterialinternal.h"
"${ENGINE_SOURCE_DIR}/public/imaterialsystem.h"
)
end_sources()
add_module( "lib" "materialsystem_nodx" "vpc" ${FOLDER_CONTEXT} TRUE TRUE )
start_sources()
add_sources( SOURCE_GROUP "Private"
"cmaterialsystem.cpp"
"cmaterialsystem.h"
)
add_sources( SOURCE_GROUP "Public"
"${ENGINE_SOURCE_DIR}/public/imaterialsystem.h"
)
end_sources()
target_compile_definitions( ${PROJECT_NAME} PRIVATE
"MATERIALSYSTEM_NODX"
)