# 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
# 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
# -llog for native Android logging
LIST(APPEND LIBS android log)
ELSEIF(BLACKBERRY)
- if(PLAYBOOK)
- # -lbps for event loop
- # -screen for native screen
- LIST(APPEND LIBS bps screen)
- ELSE()
- # -lbps for event loop
+ # -lbps for event loop
+ # -screen for native screen
+ LIST(APPEND LIBS bps screen)
+
+ if(NOT PLAYBOOK)
# -lslog2 for logging
- # -screen for native screen
- LIST(APPEND LIBS bps slog2 screen)
+ # -pps for low-level screen manipulation
+ LIST(APPEND LIBS slog2 pps)
ENDIF()
ENDIF()
# 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})