CMake: detect GTest if it is installed
This commit is contained in:
parent
0942bdae1c
commit
747021e0c8
|
@ -1,7 +1,7 @@
|
||||||
########################################
|
########################################
|
||||||
# General setup
|
# General setup
|
||||||
#
|
#
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
|
||||||
option(ANDROID "Enables a build for Android" OFF)
|
option(ANDROID "Enables a build for Android" OFF)
|
||||||
option(USE_EGL "Enables EGL OpenGL Interface" OFF)
|
option(USE_EGL "Enables EGL OpenGL Interface" OFF)
|
||||||
|
@ -331,6 +331,14 @@ if(NOT OPENMP_FOUND)
|
||||||
message("OpenMP parallelization disabled")
|
message("OpenMP parallelization disabled")
|
||||||
endif()
|
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)
|
if(NOT ANDROID)
|
||||||
|
|
||||||
include(FindOpenGL)
|
include(FindOpenGL)
|
||||||
|
|
Loading…
Reference in New Issue