tweaks for building on older machines

issue480
Don Bright 2013-09-22 16:35:29 -05:00
parent 5f36117b8f
commit 40a198a087
2 changed files with 25 additions and 3 deletions

View File

@ -53,6 +53,16 @@ printUsage()
echo
}
detect_glu()
{
detect_glu_result=
if [ -e $DEPLOYDIR/include/GL/glu.h ]; then detect_glu_result=1; fi
if [ -e /usr/include/GL/glu.h ]; then detect_glu_result=1; fi
if [ -e /usr/local/include/GL/glu.h ]; then detect_glu_result=1; fi
if [ -e /usr/pkg/X11R7/include/GL/glu.h ]; then detect_glu_result=1; fi
return
}
build_glu()
{
version=$1
@ -436,7 +446,8 @@ build_opencsg()
cp src/Makefile src/Makefile.bak2
cat src/Makefile.bak2 | sed s@^LIBS.*@LIBS\ =\ -L$BASEDIR/lib\ -L/usr/X11R6/lib\ -lGLU\ -lGL@ > src/Makefile
tmp=$version
build_glu 9.0.0 # todo - autodetect the need for glu
detect_glu
if [ ! $detect_glu_result ]; then build_glu 9.0.0 ; fi
version=$tmp
fi
@ -583,6 +594,8 @@ if [ $1 ]; then
fi
# todo - cgal 4.02 for gcc<4.7, gcc 4.2 for above
#
# Main build of libraries
# edit version numbers here as needed.

View File

@ -38,8 +38,17 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
# Build debug build as default
if(NOT CMAKE_BUILD_TYPE)
# set(CMAKE_BUILD_TYPE RelWithDebInfo)
set(CMAKE_BUILD_TYPE Release)
# set(CMAKE_BUILD_TYPE Release)
if(CMAKE_COMPILER_IS_GNUCXX)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_GREATER 4.6)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
else()
set(CMAKE_BUILD_TYPE Debug)
endif()
else()
set(CMAKE_BUILD_TYPE RelWithDebInfo)
endif()
endif()
if(CMAKE_COMPILER_IS_GNUCXX)