Compare commits

...

2 commits

2 changed files with 4 additions and 2 deletions

View file

@ -35,8 +35,10 @@ ExternalProject_Get_Property(DirectX SOURCE_DIR)
include_directories(AFTER ${SOURCE_DIR}/8.0/include/)
link_directories(AFTER ${SOURCE_DIR}/8.0/lib/)
find_package (Python3 REQUIRED COMPONENTS Interpreter)
add_custom_target(
MAKE_D3D8_VMT python ${CMAKE_CURRENT_SOURCE_DIR}/src/make_D3D8_VMT.py ${CMAKE_CURRENT_SOURCE_DIR}/src/D3D8_VMT.hpp ${SOURCE_DIR}/8.0/include/d3d8.h
MAKE_D3D8_VMT ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/src/make_D3D8_VMT.py ${CMAKE_CURRENT_SOURCE_DIR}/src/D3D8_VMT.hpp ${SOURCE_DIR}/8.0/include/d3d8.h
DEPENDS DirectX
)

View file

@ -27,5 +27,5 @@ with open(outfile,"w") as ofh:
for name in sorted(VMTs.keys()):
print(f"namespace {name} {{",file=ofh)
for method,idx in sorted(VMTs[name].items(),key=lambda v:v[1]):
print(f"\tconst size_t m_{method} = {idx};",file=ofh)
print(f" const size_t m_{method} = {idx};",file=ofh)
print("}",file=ofh)