diff --git a/src/dawn_native/CMakeLists.txt b/src/dawn_native/CMakeLists.txt index 004c00af5c..552b5eea35 100644 --- a/src/dawn_native/CMakeLists.txt +++ b/src/dawn_native/CMakeLists.txt @@ -211,7 +211,50 @@ if (DAWN_ENABLE_OPENGL) RESULT_VARIABLE "DAWN_NATIVE_OPENGL_AUTOGEN_SOURCES" ) - # TODO + target_sources(dawn_native PRIVATE + "${DAWN_INCLUDE_DIR}/dawn_native/OpenGLBackend.h" + ${DAWN_NATIVE_OPENGL_AUTOGEN_SOURCES} + "opengl/BackendGL.cpp" + "opengl/BackendGL.h" + "opengl/BufferGL.cpp" + "opengl/BufferGL.h" + "opengl/CommandBufferGL.cpp" + "opengl/CommandBufferGL.h" + "opengl/ComputePipelineGL.cpp" + "opengl/ComputePipelineGL.h" + "opengl/DeviceGL.cpp" + "opengl/DeviceGL.h" + "opengl/Forward.h" + "opengl/GLFormat.cpp" + "opengl/GLFormat.h" + "opengl/NativeSwapChainImplGL.cpp" + "opengl/NativeSwapChainImplGL.h" + "opengl/OpenGLFunctions.cpp" + "opengl/OpenGLFunctions.h" + "opengl/PersistentPipelineStateGL.cpp" + "opengl/PersistentPipelineStateGL.h" + "opengl/PipelineGL.cpp" + "opengl/PipelineGL.h" + "opengl/PipelineLayoutGL.cpp" + "opengl/PipelineLayoutGL.h" + "opengl/QueueGL.cpp" + "opengl/QueueGL.h" + "opengl/RenderPipelineGL.cpp" + "opengl/RenderPipelineGL.h" + "opengl/SamplerGL.cpp" + "opengl/SamplerGL.h" + "opengl/ShaderModuleGL.cpp" + "opengl/ShaderModuleGL.h" + "opengl/SwapChainGL.cpp" + "opengl/SwapChainGL.h" + "opengl/TextureGL.cpp" + "opengl/TextureGL.h" + "opengl/UtilsGL.cpp" + "opengl/UtilsGL.h" + "opengl/opengl_platform.h" + ) + + target_link_libraries(dawn_native PRIVATE dawn_khronos_platform) endif() if (DAWN_ENABLE_VULKAN) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 54484fabf2..56993a1f8a 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -72,3 +72,8 @@ if (DAWN_BUILD_EXAMPLES) add_subdirectory(${DAWN_GLM_DIR}) endif() endif() + +# Header-only library for khrplatform.h +add_library(dawn_khronos_platform INTERFACE) +target_sources(dawn_khronos_platform INTERFACE "${DAWN_THIRD_PARTY_DIR}/khronos/KHR/khrplatform.h") +target_include_directories(dawn_khronos_platform INTERFACE "${DAWN_THIRD_PARTY_DIR}/khronos")