X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=CMakeLists.txt;h=98e928946c4d0bd812b204072476ec7f53956893;hb=cc171f59c06ef75a6baebe07acc734d0c298f9ba;hp=c71dea94ac075a53a72e12c5bf4446eca90aeba6;hpb=421588fbbc5a989c5722a0eae212917cb86e8f26;p=freeglut diff --git a/CMakeLists.txt b/CMakeLists.txt index c71dea9..98e9289 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,11 @@ set(VERSION_PATCH 0) # Update fg_version.h to match the versions number here in cmake CONFIGURE_FILE(src/fg_version.h.in src/fg_version.h) +# shared lib version numbers (change before release) +set(SO_MAJOR 3) # increment on backwards incompatible API/ABI changes +set(SO_MINOR 10) # increment on backwards compatible or internal changes +set(SO_REV 0) # if nothing else changed increment this + # FREEGLUT_BUILD_SHARED_LIBS is already a standard CMake variable, but we need to # re-declare it here so it will show up in the GUI. # by default, we want to build both @@ -44,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 @@ -360,18 +370,23 @@ 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 3.9.0 SOVERSION 3 OUTPUT_NAME ${LIBNAME}) + SET_TARGET_PROPERTIES(freeglut PROPERTIES VERSION ${SO_MAJOR}.${SO_MINOR}.${SO_REV} SOVERSION ${SO_MAJOR} OUTPUT_NAME ${LIBNAME}) ENDIF() IF(FREEGLUT_BUILD_STATIC_LIBS) SET_TARGET_PROPERTIES(freeglut_static PROPERTIES OUTPUT_NAME ${LIBNAME})