Skip to content

Commit 5502673

Browse files
committed
GLX fixes
Ref: #689
1 parent b2b5638 commit 5502673

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/cmake/friction-common.cmake

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ option(MAC_DEPLOY "Mac Deploy" OFF)
3030
option(WIN_DEPLOY "Windows Deploy" OFF)
3131
option(BUILD_SKIA "Build skia" ON)
3232
option(SKIA_STATIC "Static skia" OFF)
33+
option(USE_EGL "Use EGL" ON)
3334
set(SKIA_LIB_PATH "/mnt/skia" CACHE STRING "Path to prebuilt skia library")
3435

3536
if(${LINUX_DEPLOY})
@@ -60,6 +61,15 @@ if(UNIX)
6061
endif()
6162
endif()
6263

64+
if(${SKIA_STATIC})
65+
if(UNIX AND NOT APPLE)
66+
if(NOT OpenGL_GL_PREFERENCE)
67+
set(OpenGL_GL_PREFERENCE "GLVND")
68+
endif()
69+
find_package(OpenGL REQUIRED)
70+
endif()
71+
endif()
72+
6373
if(CMAKE_BUILD_TYPE MATCHES "^(release|Release|RELEASE)$")
6474
add_definitions(-DQT_NO_DEBUG_OUTPUT)
6575
else()
@@ -108,7 +118,7 @@ else()
108118
if(APPLE)
109119
set(SKIA_LIBRARIES skia z)
110120
else()
111-
set(SKIA_LIBRARIES skia)
121+
set(SKIA_LIBRARIES skia ${OPENGL_LIBRARY})
112122
endif()
113123
else()
114124
set(SKIA_LIBRARIES skia-friction)

src/core/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ add_definitions(-DPROJECT_BRANCH="${GIT_BRANCH}")
3939
add_definitions(-DCORE_LIBRARY)
4040

4141
if(UNIX AND NOT APPLE)
42-
option(USE_EGL "Use EGL" ON)
4342
if(${USE_EGL})
4443
add_definitions(-DFRICTION_EGL)
4544
endif()

0 commit comments

Comments
 (0)