Fix platform-specific client libraries for Linux

Do not hardcode library names, detect and depend on them properly instead.
This commit is contained in:
Dmitry Marakasov 2019-04-22 19:33:52 +03:00 committed by Learath
parent 8c85d0d2a7
commit e404d6fd63

View file

@ -443,7 +443,10 @@ elseif(TARGET_OS STREQUAL "mac")
set(PLATFORM_LIBS ${CARBON} ${SECURITY})
else()
set(PLATFORM_CLIENT)
set(PLATFORM_CLIENT_LIBS GL GLU X11)
find_package(OpenGL)
find_package(X11)
set(PLATFORM_CLIENT_LIBS ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${X11_X11_LIB})
set(PLATFORM_CLIENT_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR} ${X11_X11_INCLUDE_PATH})
if(TARGET_OS STREQUAL "linux")
set(PLATFORM_LIBS rt) # clock_gettime for glibc < 2.17
else()