Skip to content

Commit e404d6f

Browse files
AMDmi3Learath2
authored andcommitted
Fix platform-specific client libraries for Linux
Do not hardcode library names, detect and depend on them properly instead.
1 parent 8c85d0d commit e404d6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,10 @@ elseif(TARGET_OS STREQUAL "mac")
443443
set(PLATFORM_LIBS ${CARBON} ${SECURITY})
444444
else()
445445
set(PLATFORM_CLIENT)
446-
set(PLATFORM_CLIENT_LIBS GL GLU X11)
446+
find_package(OpenGL)
447+
find_package(X11)
448+
set(PLATFORM_CLIENT_LIBS ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${X11_X11_LIB})
449+
set(PLATFORM_CLIENT_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR} ${X11_X11_INCLUDE_PATH})
447450
if(TARGET_OS STREQUAL "linux")
448451
set(PLATFORM_LIBS rt) # clock_gettime for glibc < 2.17
449452
else()

0 commit comments

Comments
 (0)