1662: Fix platform-specific client libraries for Linux. Fix #1660 r=def- a=Learath2

Do not hardcode library names, detect and depend on them properly instead.

Closes #1660 

Co-authored-by: Dmitry Marakasov <amdmi3@amdmi3.ru>
This commit is contained in:
bors[bot] 2019-04-23 16:14:46 +00:00
commit 37461e3d48

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()