Skip to content

Commit

Permalink
Use CMAKE_FIND_FRAMEWORK ONLY for OpenGL on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
chanderson0 committed Sep 10, 2024
1 parent d643970 commit 3320f2a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,16 @@ if(MSVC)
endif()

# Dependencies
find_package(OpenGL REQUIRED)
if (APPLE)
# Force CMake to use the installed version of OpenGL on macOS
set(_SAVE_CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK})
set(CMAKE_FIND_FRAMEWORK ONLY)
find_package(OpenGL REQUIRED)
set(CMAKE_FIND_FRAMEWORK ${_SAVE_CMAKE_FIND_FRAMEWORK})
unset(_SAVE_CMAKE_FIND_FRAMEWORK)
else()
find_package(OpenGL REQUIRED)
endif()

find_package(LZ4 REQUIRED)

Expand Down

0 comments on commit 3320f2a

Please sign in to comment.