Skip to content

Commit 97718c3

Browse files
CMake: do not search for OpenGL library when DILIGENT_NO_OPENGL is set
1 parent cb4fb07 commit 97718c3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,11 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
470470
endif()
471471

472472
if(PLATFORM_LINUX)
473-
find_library(OPENGL_LIBRARY GL)
474-
if (NOT OPENGL_LIBRARY)
475-
message(FATAL_ERROR "Failed to find OpenGL library")
473+
if(NOT DILIGENT_NO_OPENGL)
474+
find_library(OPENGL_LIBRARY GL)
475+
if (NOT OPENGL_LIBRARY)
476+
message(FATAL_ERROR "Failed to find OpenGL library")
477+
endif()
476478
endif()
477479
elseif(PLATFORM_MACOS)
478480
find_library(APP_KIT AppKit)

0 commit comments

Comments
 (0)