X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=CMakeLists.txt;h=98e928946c4d0bd812b204072476ec7f53956893;hb=cc171f59c06ef75a6baebe07acc734d0c298f9ba;hp=17436cdbc4e285ec5b6b3c841c11c8720959422f;hpb=612bdf37e1979444ebd5d959c5cc63b27a338661;p=freeglut diff --git a/CMakeLists.txt b/CMakeLists.txt index 17436cd..98e9289 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,6 +49,11 @@ ENDIF() # OpenGL ES support OPTION(FREEGLUT_GLES "Use OpenGL ES (requires EGL)" OFF) +# option to build either as "glut" (ON) or "freeglut" (OFF) +IF(NOT WIN32) + OPTION(FREEGLUT_REPLACE_GLUT "Be a replacement for GLUT" ON) +ENDIF() + SET(FREEGLUT_HEADERS include/GL/freeglut.h @@ -365,15 +370,20 @@ ELSE() # or special-cased FreeGLUT long ago (e.g. .so.4 on OpenBSD), so # the lack of support for current:revision:age in CMake should # not be a problem. - # - the output library should be named glut so it'll be linkable with -lglut + # - the output library should be named glut so it'll be linkable with -lglut + # (unless FREEGLUT_REPLACE_GLUT is false). # - the shared library should link to the dependency libraries so that the user # won't have to link them explicitly (they shouldn't have to know that we depend # on Xrandr or Xxf86vm) IF(FREEGLUT_GLES) - SET(LIBNAME freeglut-gles) + SET(LIBNAME freeglut-gles) ELSE() - SET(LIBNAME glut) - ENDIF() + IF(FREEGLUT_REPLACE_GLUT) + SET(LIBNAME glut) + ELSE() + SET(LIBNAME freeglut) + ENDIF() + ENDIF() IF(FREEGLUT_BUILD_SHARED_LIBS) SET_TARGET_PROPERTIES(freeglut PROPERTIES VERSION ${SO_MAJOR}.${SO_MINOR}.${SO_REV} SOVERSION ${SO_MAJOR} OUTPUT_NAME ${LIBNAME})