SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
# setup version numbers
-# TODO: Update these for each release!
+# XXX: Update these for each release!
set(VERSION_MAJOR 3)
set(VERSION_MINOR 2)
-set(VERSION_PATCH 1)
+set(VERSION_PATCH 2)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
# 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)
+# shared lib version numbers (XXX: change before release)
set(SO_MAJOR 3) # increment on backwards incompatible API/ABI changes
-set(SO_MINOR 11) # increment on backwards compatible or internal changes
-set(SO_REV 0) # if nothing else changed increment this
+set(SO_MINOR 11) # increment on backwards compatible API additions
+set(SO_REV 1) # increment if only internal changes happened between releases
# 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.
INCLUDE(CheckFunctionExists)
INCLUDE(CheckTypeSize)
+INCLUDE(CheckCCompilerFlag)
CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mandroid")
ENDIF()
- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -gstabs+")
+ CHECK_C_COMPILER_FLAG(-O0 HAVE_O0_FLAG)
+ IF(HAVE_O0_FLAG)
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
+ ENDIF()
+ CHECK_C_COMPILER_FLAG(-gstabs+ HAVE_GSTABSP_FLAG)
+ IF(HAVE_gstabsp_FLAG)
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -gstabs+")
+ ENDIF()
ENDIF()
ENDIF()
IF(FREEGLUT_BUILD_SHARED_LIBS)
progs/demos/shapes/glmatrix.h
progs/demos/shapes/glmatrix.c)
ADD_DEMO(smooth_opengl3 progs/demos/smooth_opengl3/smooth_opengl3.c)
-IF(UNIX)
- ADD_DEMO(spaceball progs/demos/spaceball/spaceball.c
- progs/demos/spaceball/vmath.c
- progs/demos/spaceball/vmath.h)
-ENDIF()
+ADD_DEMO(spaceball progs/demos/spaceball/spaceball.c
+ progs/demos/spaceball/vmath.c
+ progs/demos/spaceball/vmath.h)
ADD_DEMO(subwin progs/demos/subwin/subwin.c)
ADD_DEMO(timer progs/demos/timer/timer.c)
ADD_DEMO(timer_callback progs/demos/timer_callback/timer.c)
+ADD_DEMO(keyboard progs/demos/keyboard/keyboard.c)