diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2013-09-22 21:35:29 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2013-09-22 21:35:29 (GMT) |
commit | 40a198a0870d53f491ba72a95a57b9f405d031c0 (patch) | |
tree | 0ab33a5d68cc86c76bd1b038e5aa27f566bd6c20 | |
parent | 5f36117b8ff7e14ae450e770cdaa67e60561672d (diff) |
tweaks for building on older machines
-rwxr-xr-x | scripts/uni-build-dependencies.sh | 15 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 13 |
2 files changed, 25 insertions, 3 deletions
diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh index 6596c8a..bc2b179 100755 --- a/scripts/uni-build-dependencies.sh +++ b/scripts/uni-build-dependencies.sh @@ -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. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 387d6ee..5405d04 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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) |