diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a012553..9ac2eb0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -309,7 +309,8 @@ if(ENABLE_GUI) "${CMAKE_SOURCE_DIR}/extlib/si/siapp.lib") endif() elseif(APPLE) - find_package(OpenGL REQUIRED) + set(CMAKE_C_FLAGS "-framework OpenGL ${CMAKE_C_FLAGS}") + set(CMAKE_CXX_FLAGS "-framework OpenGL ${CMAKE_CXX_FLAGS}") find_library(APPKIT_LIBRARY AppKit REQUIRED) elseif(EMSCRIPTEN) # Everything is built in