From f3eb245e98513d612a864da495e983faf4cd00ad Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 19 Nov 2014 17:42:11 +0000 Subject: [PATCH] Added CMake script to set the default CMAKE_BUILD_TYPE to Release. Approach taken from simgear. git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14489 16af8721-9629-0410-8352-f15c8da7e697 --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 218063c24..1bead3254 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,13 @@ SET(OpenThreads_SOURCE_DIR ${OpenSceneGraph_SOURCE_DIR}) # Maybe this can be used override existing behavior if needed? SET(CMAKE_MODULE_PATH "${OpenSceneGraph_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}") + +# Change the default build type to Release +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE) +ENDIF(NOT CMAKE_BUILD_TYPE) + + ## Option to enable Android build using AndroidNDK OPTION(OSG_BUILD_PLATFORM_ANDROID OFF) IF(OSG_BUILD_PLATFORM_ANDROID)