# but do use GLES constants directly for all other needs
# GLES1 and GLES2 libraries are compatible and can be co-linked.
IF(FREEGLUT_GLES)
- ADD_DEFINITIONS(-DFREEGLUT_GLES)
- LIST(APPEND LIBS GLESv2 GLESv1_CM EGL)
+ LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES)
+ LIST(APPEND LIBS GLESv2 GLESv1_CM EGL)
ELSE()
FIND_PACKAGE(OpenGL REQUIRED)
LIST(APPEND LIBS ${OPENGL_gl_LIBRARY})
ENDIF()
IF(FREEGLUT_BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES(freeglut ${LIBS})
+ TARGET_COMPILE_DEFINITIONS(freeglut PUBLIC ${PUBLIC_DEFINITIONS})
ENDIF()
IF(FREEGLUT_BUILD_STATIC_LIBS)
TARGET_LINK_LIBRARIES(freeglut_static ${LIBS})
+ TARGET_COMPILE_DEFINITIONS(freeglut_static PUBLIC ${PUBLIC_DEFINITIONS})
ENDIF()
IF(FREEGLUT_BUILD_SHARED_LIBS)