Files
2026-09-07 14:53:36 +08:00

30 lines
1.4 KiB
CMake
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# libgr2 —— gr2 v6 只读读取器(M0)。零第三方依赖。
add_library(libgr2 STATIC
src/gr2_file.cpp # T1 header + section table + fixup
src/gr2_decompress.cpp # T2 section 解压分派
src/oodle1.c # T2 Granny Oodle1 解码(端口自泄露 SDK
src/gr2_typetree.cpp # T3 自描述类型树遍历
src/gr2_fileinfo.cpp # T4 FileInfo 汇总
src/gr2_skeleton.cpp # T5 骨架 + bind pose 自洽检查
src/gr2_mesh.cpp # T6 顶点 / 索引 / 三角组 / BoneBindings
src/gr2_anim.cpp # T7a/T7b 曲线分类 + 解码子集
src/gr2_material.cpp # 材质视图(附加):root.Materials → 贴图文件名
)
add_library(xrender::libgr2 ALIAS libgr2)
target_include_directories(libgr2
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_compile_features(libgr2 PUBLIC cxx_std_20)
if(BUILD_TESTING)
add_executable(libgr2_loader_errors_test tests/loader_errors.cpp)
target_link_libraries(libgr2_loader_errors_test PRIVATE xrender::libgr2)
add_test(NAME libgr2.loader_errors COMMAND libgr2_loader_errors_test)
add_executable(libgr2_animation_test tests/animation.cpp)
target_link_libraries(libgr2_animation_test PRIVATE xrender::libgr2)
add_test(NAME libgr2.animation COMMAND libgr2_animation_test)
endif()