- Implement dependency graph for resource management - Add/remove nodes and dependencies - Reference counting support - Circular dependency detection - Add unit tests
49 lines
1.2 KiB
CMake
49 lines
1.2 KiB
CMake
# ============================================================
|
|
# Resources Library Tests
|
|
# ============================================================
|
|
|
|
set(RESOURCES_TEST_SOURCES
|
|
test_resource_types.cpp
|
|
test_resource_guid.cpp
|
|
test_iresource.cpp
|
|
test_resource_handle.cpp
|
|
test_resource_cache.cpp
|
|
test_iresource_loader.cpp
|
|
test_texture.cpp
|
|
test_mesh.cpp
|
|
test_audio_clip.cpp
|
|
test_resource_filesystem.cpp
|
|
test_file_archive.cpp
|
|
test_shader.cpp
|
|
test_material.cpp
|
|
test_texture_loader.cpp
|
|
test_mesh_loader.cpp
|
|
test_audio_loader.cpp
|
|
test_shader_loader.cpp
|
|
test_material_loader.cpp
|
|
test_resource_package.cpp
|
|
test_resource_dependency.cpp
|
|
)
|
|
|
|
add_executable(xcengine_resources_tests ${RESOURCES_TEST_SOURCES})
|
|
|
|
if(MSVC)
|
|
set_target_properties(xcengine_resources_tests PROPERTIES
|
|
LINK_FLAGS "/NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:libcmt.lib"
|
|
)
|
|
endif()
|
|
|
|
target_link_libraries(xcengine_resources_tests
|
|
PRIVATE
|
|
XCEngine
|
|
GTest::gtest
|
|
GTest::gtest_main
|
|
)
|
|
|
|
target_include_directories(xcengine_resources_tests PRIVATE
|
|
${CMAKE_SOURCE_DIR}/engine/include
|
|
${CMAKE_SOURCE_DIR}/tests/fixtures
|
|
)
|
|
|
|
add_test(NAME ResourcesTests COMMAND xcengine_resources_tests)
|