Skip to content

Commit

Permalink
Merge branch 'fix-macos-libraries' into 'master'
Browse files Browse the repository at this point in the history
Use CMAKE_FIND_FRAMEWORK ONLY for OpenGL on MacOS

Closes #7934

See merge request OpenMW/openmw!4368
  • Loading branch information
psi29a committed Sep 11, 2024
2 parents 0f74e0c + 3320f2a commit 6b762a5
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 6b762a5

Please sign in to comment.