Skip to content

Commit 20e05ec

Browse files
committed
Also compile wgl.c
1 parent 24118f3 commit 20e05ec

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

graf3d/rglew/CMakeLists.txt

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

17+
set(rglew_srcs src/gl.c)
1718
set(rglew_libs OpenGL::GL)
1819

1920
find_library(DL_LIBRARY_PATH dl)
@@ -22,24 +23,15 @@ if (DL_LIBRARY_PATH)
2223
endif()
2324

2425
if(x11)
26+
list(APPEND rglew_srcs src/glx.c)
2527
list(APPEND rglew_libs ${X11_LIBRARIES})
26-
ROOT_LINKER_LIBRARY(RGlew
27-
src/gl.c
28-
src/glx.c
29-
LIBRARIES
30-
${rglew_libs}
31-
)
32-
else()
33-
ROOT_LINKER_LIBRARY(RGlew
34-
src/gl.c
35-
# src/wgl.c
36-
LIBRARIES
37-
${rglew_libs}
38-
)
3928
endif()
4029

41-
# Is this needed?
42-
target_include_directories(RGlew PRIVATE ${CMAKE_SOURCE_DIR}/graf3d/rglew/inc/)
30+
if(MSVC)
31+
list(APPEND rglew_srcs src/wgl.c)
32+
endif()
33+
34+
ROOT_LINKER_LIBRARY(RGlew ${rglew_srcs} LIBRARIES ${rglew_libs})
4335

4436
# We still need to install TGLIncludes.h into include/
4537
ROOT_INSTALL_HEADERS()

0 commit comments

Comments
 (0)