Skip to content

Commit 75ad533

Browse files
committed
dep/glad: Add WGL, EGL, GLX
1 parent fb443ea commit 75ad533

File tree

9 files changed

+6116
-1
lines changed

9 files changed

+6116
-1
lines changed

dep/glad/CMakeLists.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,17 @@ set(SRCS
55
add_library(glad ${SRCS})
66
target_include_directories(glad PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include")
77
target_include_directories(glad INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
8-
target_link_libraries(glad Threads::Threads "${CMAKE_DL_LIBS}")
8+
target_link_libraries(glad PRIVATE Threads::Threads "${CMAKE_DL_LIBS}")
9+
10+
if(WIN32)
11+
target_sources(glad PRIVATE src/glad_wgl.c)
12+
else()
13+
if(USE_EGL)
14+
target_sources(glad PRIVATE src/glad_egl.c)
15+
target_link_libraries(glad PRIVATE EGL::EGL)
16+
endif()
17+
if(USE_GLX)
18+
target_sources(glad PRIVATE src/glad_glx.c)
19+
target_link_options(glad PRIVATE OpenGL::GLX)
20+
endif()
21+
endif()

dep/glad/glad.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@
3636
</ItemGroup>
3737
<ItemGroup>
3838
<ClCompile Include="src\glad.c" />
39+
<ClCompile Include="src\glad_wgl.c" />
3940
</ItemGroup>
4041
<ItemGroup>
4142
<ClInclude Include="include\glad.h" />
43+
<ClInclude Include="include\glad_wgl.h" />
4244
<ClInclude Include="include\khrplatform.h" />
4345
</ItemGroup>
4446
<PropertyGroup Label="Globals">

dep/glad/glad.vcxproj.filters

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup>
44
<ClCompile Include="src\glad.c" />
5+
<ClCompile Include="src\glad_wgl.c" />
56
</ItemGroup>
67
<ItemGroup>
78
<ClInclude Include="include\khrplatform.h" />
89
<ClInclude Include="include\glad.h" />
10+
<ClInclude Include="include\glad_wgl.h" />
911
</ItemGroup>
1012
</Project>

dep/glad/include/glad_egl.h

Lines changed: 1619 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)