Skip to content

Commit

Permalink
Suppress OpenGL deprecation warnings on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Dec 10, 2019
1 parent 2fce634 commit 127596e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bot2-lcmgl/src/bot_lcmgl_render/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ target_include_directories(bot2-lcmgl-renderer
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
)
if(APPLE)
target_compile_definitions(bot2-lcmgl-renderer PRIVATE GL_SILENCE_DEPRECATION=1)
endif()

# set the library API version. Increment this every time the public API
# changes.
Expand Down
3 changes: 3 additions & 0 deletions bot2-vis/src/bot_vis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ target_include_directories(${PROJECT_NAME}
)
set_property(TARGET bot2-vis PROPERTY C_STANDARD 99)
target_compile_options(bot2-vis PRIVATE ${PNG_DEFINITIONS})
if(APPLE)
target_compile_definitions(bot2-vis PRIVATE GL_SILENCE_DEPRECATION=1)
endif()
set(REQUIRED_PACKAGES glib-2.0 gtk+-3.0 gdk-pixbuf-3.0 lcm bot2-core libpng gl glu gthread-2.0)

# set the library API version. Increment this every time the public API
Expand Down
3 changes: 3 additions & 0 deletions bot2-vis/src/rwx-viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ add_executable(bot-rwx-viewer
main.c
renderer_rwx.c)
target_link_libraries(bot-rwx-viewer bot2-vis ${GTK3_LIBRARIES} OpenGL::GL ${GLUT_LIBRARIES})
if(APPLE)
target_compile_definitions(bot-rwx-viewer PRIVATE GL_SILENCE_DEPRECATION=1)
endif()
set_property(TARGET bot-rwx-viewer PROPERTY C_STANDARD 99)

pods_install_executables(EXPORT ${PROJECT_NAME} bot-rwx-viewer)
3 changes: 3 additions & 0 deletions bot2-vis/src/testers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ set(testers
foreach(tester ${testers})
add_executable(${tester} "${tester}.c")
target_link_libraries(${tester} bot2-vis GLib2::glib ${GTK3_LIBRARIES} OpenGL::GL OpenGL::GLU)
if(APPLE)
target_compile_definitions(${tester} PRIVATE GL_SILENCE_DEPRECATION=1)
endif()
set_property(TARGET ${tester} PROPERTY C_STANDARD 99)
endforeach()

0 comments on commit 127596e

Please sign in to comment.