Skip to content

Commit

Permalink
build: fix OpenGL defaults for macOS
Browse files Browse the repository at this point in the history
Disable use of libglvnd on macOS.  Silence deprecations warnings
that prevent a clean build.

Closes wdas#91
Signed-off-by: David Aguilar <[email protected]>
  • Loading branch information
davvid committed Jan 20, 2021
1 parent ea28ff4 commit 11dbcec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ set(PARTIO_VERSION_MAJOR "1")

option(PARTIO_GTEST_ENABLED "Enable GTest for tests" OFF)

if(WIN32)
if(WIN32 OR APPLE)
option(PARTIO_USE_GLVND "Use GLVND for OpenGL" OFF)
option(PARTIO_BUILD_SHARED_LIBS "Enabled shared libraries" OFF)
else()
Expand Down Expand Up @@ -77,6 +77,7 @@ endif()

if (APPLE)
set(CMAKE_SHARED_LINKER_FLAGS "-undefined dynamic_lookup")
add_definitions(-DGL_SILENCE_DEPRECATION)
endif()

if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
Expand Down

0 comments on commit 11dbcec

Please sign in to comment.