X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=CMakeLists.txt;h=be50f98c5fee24f9ce135063ca48ea38993280c8;hb=bcf3fe1b4600eb9926d8d17a5a6cca363f0d3ee4;hp=4be7c731d564c3b9f1c354f5ffcd0bd92bb104f3;hpb=db3cff25e0dcdfb5a999bb677e0f423bc3201b8f;p=freeglut diff --git a/CMakeLists.txt b/CMakeLists.txt index 4be7c73..be50f98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -245,8 +245,8 @@ ENDIF() # 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}) @@ -449,9 +449,11 @@ ELSE() 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)