looking-glass/c-host/cmake/PostCapture.cmake
2019-04-09 16:28:11 +10:00

15 lines
510 B
CMake

list(REMOVE_AT CAPTURE 0)
list(REMOVE_AT CAPTURE_LINK 0)
list(LENGTH CAPTURE CAPTURE_COUNT)
file(APPEND ${CAPTURE_H} "#define LG_CAPTURE_COUNT ${CAPTURE_COUNT}\n")
foreach(renderer ${CAPTURE})
file(APPEND ${CAPTURE_C} "extern CaptureInterface Capture_${renderer};\n")
endforeach()
file(APPEND ${CAPTURE_C} "\nconst CaptureInterface * CaptureInterfaces[] =\n{\n")
foreach(renderer ${CAPTURE})
file(APPEND ${CAPTURE_C} " &Capture_${renderer},\n")
endforeach()
file(APPEND ${CAPTURE_C} " NULL\n};")