diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a38af9c37..c80f1d6f13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ ######################################## # General setup # -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 2.8) option(ANDROID "Enables a build for Android" OFF) option(USE_EGL "Enables EGL OpenGL Interface" OFF) @@ -331,6 +331,14 @@ if(NOT OPENMP_FOUND) message("OpenMP parallelization disabled") endif() +include(FindGTest OPTIONAL) +if(GTEST_FOUND) + include_directories(${GTEST_INCLUDE_DIRS}) + message("GTest found, unit tests can be compiled and ran with 'ctest'") +else() + message("GTest NOT found, disabling unit tests") +endif(GTEST_FOUND) + if(NOT ANDROID) include(FindOpenGL)