Skip to content

Commit 5713b9d

Browse files
committed
Only build glx if x11=ON
1 parent 3811ed4 commit 5713b9d

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

graf3d/rglew/CMakeLists.txt

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

17-
ROOT_LINKER_LIBRARY(RGlew
18-
src/gl.c
19-
# src/wgl.c
20-
src/glx.c
21-
LIBRARIES
22-
OpenGL::GL
23-
${X11_LIBRARIES}
24-
)
17+
if(x11)
18+
ROOT_LINKER_LIBRARY(RGlew
19+
src/gl.c
20+
src/glx.c
21+
LIBRARIES
22+
OpenGL::GL
23+
${X11_LIBRARIES}
24+
)
25+
else()
26+
ROOT_LINKER_LIBRARY(RGlew
27+
src/gl.c
28+
# src/wgl.c
29+
LIBRARIES
30+
OpenGL::GL
31+
)
32+
endif()
2533

2634
# Is this needed?
2735
target_include_directories(RGlew PRIVATE ${CMAKE_SOURCE_DIR}/graf3d/rglew/inc/)

0 commit comments

Comments
 (0)