fix cmake for MACOS

This commit is contained in:
Krishna Vedala 2020-07-03 22:56:06 -04:00
parent 1580fa42f8
commit 3a0d98e7e7
No known key found for this signature in database
GPG Key ID: BA19ACF8FC8792F7

View File

@ -27,8 +27,12 @@ foreach( testsourcefile ${APP_SOURCES} )
target_link_libraries(${testname} ${MATH_LIBRARY})
endif()
if (GLUT_FOUND)
if(APPLE)
target_compile_options(${testname} PUBLIC -Wno-deprecated)
endif(APPLE)
target_compile_definitions(${testname} PUBLIC USE_GLUT)
target_link_libraries(${testname} OpenGL::GL GLUT::GLUT)
target_include_directories(${testname} PUBLIC ${GLUT_INCLUDE_DIRS})
target_link_libraries(${testname} OpenGL::GL ${GLUT_LIBRARIES})
endif(GLUT_FOUND)
install(TARGETS ${testname} DESTINATION "bin/graphics")