1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00

Merge branch 'fix-macos-libraries' into 'master'

Use CMAKE_FIND_FRAMEWORK ONLY for OpenGL on MacOS

Closes #7934

See merge request OpenMW/openmw!4368
This commit is contained in:
psi29a 2024-09-11 08:29:57 +00:00
commit 6b762a5328

View File

@ -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)