Set public definitions in cmake package.
As with pkg-config, the cmake package now sets "-DFREEGLUT_GLES" when appropriate. (cherry picked from commit792d805542
) (cherry picked from commit792d805542
) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1771 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
866f61ae9c
commit
9825293425
@ -245,7 +245,7 @@ ENDIF()
|
|||||||
# but do use GLES constants directly for all other needs
|
# but do use GLES constants directly for all other needs
|
||||||
# GLES1 and GLES2 libraries are compatible and can be co-linked.
|
# GLES1 and GLES2 libraries are compatible and can be co-linked.
|
||||||
IF(FREEGLUT_GLES)
|
IF(FREEGLUT_GLES)
|
||||||
ADD_DEFINITIONS(-DFREEGLUT_GLES)
|
LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES)
|
||||||
LIST(APPEND LIBS GLESv2 GLESv1_CM EGL)
|
LIST(APPEND LIBS GLESv2 GLESv1_CM EGL)
|
||||||
ELSE()
|
ELSE()
|
||||||
FIND_PACKAGE(OpenGL REQUIRED)
|
FIND_PACKAGE(OpenGL REQUIRED)
|
||||||
@ -449,9 +449,11 @@ ELSE()
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
IF(FREEGLUT_BUILD_SHARED_LIBS)
|
IF(FREEGLUT_BUILD_SHARED_LIBS)
|
||||||
TARGET_LINK_LIBRARIES(freeglut ${LIBS})
|
TARGET_LINK_LIBRARIES(freeglut ${LIBS})
|
||||||
|
TARGET_COMPILE_DEFINITIONS(freeglut PUBLIC ${PUBLIC_DEFINITIONS})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(FREEGLUT_BUILD_STATIC_LIBS)
|
IF(FREEGLUT_BUILD_STATIC_LIBS)
|
||||||
TARGET_LINK_LIBRARIES(freeglut_static ${LIBS})
|
TARGET_LINK_LIBRARIES(freeglut_static ${LIBS})
|
||||||
|
TARGET_COMPILE_DEFINITIONS(freeglut_static PUBLIC ${PUBLIC_DEFINITIONS})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(FREEGLUT_BUILD_SHARED_LIBS)
|
IF(FREEGLUT_BUILD_SHARED_LIBS)
|
||||||
|
Reference in New Issue
Block a user