ladybird/Meta/CMake/libgl_generators.cmake
Karol Kosek bc587b89d8 CMake: Don't require to install glapi.h to system
This failed when a current build configuration hadn't got any program
depending on LibGL.
2023-02-04 15:53:07 -07:00

14 lines
460 B
CMake

function (generate_libgl_implementation)
set(LIBGL_INPUT_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}")
invoke_generator(
"GLAPI.cpp"
Lagom::GenerateGLAPIWrapper
"${LIBGL_INPUT_FOLDER}/GLAPI.json"
"GL/glapi.h"
"GLAPI.cpp"
arguments -j "${LIBGL_INPUT_FOLDER}/GLAPI.json"
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/GL/glapi.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/LibGL/GL/" OPTIONAL)
endfunction()