Skip to content

Commit

Permalink
This is a combination of 2 commits.
Browse files Browse the repository at this point in the history
Opt in to using GLVND for OpenGL

Set CMake policy to favour GLVND if old and new libraries are available.
  • Loading branch information
simonowen committed Apr 7, 2022
1 parent bdaf8ec commit 5cc7ab6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cmake_minimum_required(VERSION 3.14)
cmake_policy (SET CMP0072 NEW) # prefer GLVND for OpenGL

project(simcoupe)
set(PROJECT_TITLE SimCoupe)

Expand Down Expand Up @@ -315,8 +317,7 @@ elseif (BUILD_SDL)

find_package(OpenGL)
if (OPENGL_FOUND)
target_include_directories(${PROJECT_NAME} PRIVATE ${OPENGL_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} PRIVATE ${OPENGL_LIBRARY})
target_link_libraries(${PROJECT_NAME} PRIVATE ${OPENGL_LIBRARIES})
set(HAVE_OPENGL 1)
endif()
endif()
Expand Down

0 comments on commit 5cc7ab6

Please sign in to comment.