Skip to content

Commit 31884b7

Browse files
committed
Link RGlew against dl
1 parent 1fad216 commit 31884b7

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

graf3d/rglew/CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,27 @@
1414
# compile the corresponding source files.
1515
# For now hardcode for linux.
1616

17+
set(rglew_libs OpenGL::GL)
18+
19+
find_library(DL_LIBRARY_PATH dl)
20+
if (DL_LIBRARY_PATH)
21+
list(APPEND rglew_libs dl)
22+
endif()
23+
1724
if(x11)
25+
list(APPEND rglew_libs ${X11_LIBRARIES})
1826
ROOT_LINKER_LIBRARY(RGlew
1927
src/gl.c
2028
src/glx.c
2129
LIBRARIES
22-
OpenGL::GL
23-
${X11_LIBRARIES}
30+
${rglew_libs}
2431
)
2532
else()
2633
ROOT_LINKER_LIBRARY(RGlew
2734
src/gl.c
2835
# src/wgl.c
2936
LIBRARIES
30-
OpenGL::GL
37+
${rglew_libs}
3138
)
3239
endif()
3340

0 commit comments

Comments
 (0)