X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=CMakeLists.txt;h=98e928946c4d0bd812b204072476ec7f53956893;hb=cc171f59c06ef75a6baebe07acc734d0c298f9ba;hp=0227a950481376dd96fa8b0fbd914d3f6e80bb84;hpb=a91c4e11d70265093dc3a7c15ed3f1b07883e9df;p=freeglut diff --git a/CMakeLists.txt b/CMakeLists.txt index 0227a95..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 @@ -268,15 +278,14 @@ IF(ANDROID) # -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() @@ -289,11 +298,8 @@ CHECK_INCLUDE_FILES(stdbool.h HAVE_STDBOOL_H) CHECK_INCLUDE_FILES(sys/param.h HAVE_SYS_PARAM_H) CHECK_INCLUDE_FILES(sys/ioctl.h HAVE_SYS_IOCTL_H) CHECK_INCLUDE_FILES(fcntl.h HAVE_FCNTL_H) -CHECK_INCLUDE_FILES(errno.h HAVE_ERRNO_H) CHECK_INCLUDE_FILES(usbhid.h HAVE_USBHID_H) CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY) -CHECK_FUNCTION_EXISTS(vfprintf HAVE_VFPRINTF) -CHECK_FUNCTION_EXISTS(_doprnt HAVE_DOPRNT) CHECK_FUNCTION_EXISTS(XParseGeometry HAVE_XPARSEGEOMETRY) IF (NOT HAVE_XPARSEGEOMETRY) LIST(APPEND FREEGLUT_SRCS @@ -364,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})