aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlyssa Wilk <alyssar@chromium.org>2017-08-28 16:10:12 -0400
committerAlyssa Wilk <alyssar@chromium.org>2017-08-28 16:10:12 -0400
commitc00373320db8cfbd1524e73e7b2793a22ecb2672 (patch)
treefe20e7200424c65ab9acb8ff38ff1b2e86204ba6 /CMakeLists.txt
parenta2803bc37dafdaad05b335e64a83aff03096a4ba (diff)
parentb43bfcf49166599955ba3713952bc6c0e96b421b (diff)
downloadgoogletest-c00373320db8cfbd1524e73e7b2793a22ecb2672.tar.gz
googletest-c00373320db8cfbd1524e73e7b2793a22ecb2672.tar.bz2
googletest-c00373320db8cfbd1524e73e7b2793a22ecb2672.zip
Merge branch 'refs/heads/master' into flag-default
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30486302..f8a97faa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,11 +8,24 @@ project( googletest-distribution )
enable_testing()
+include(CMakeDependentOption)
+if (CMAKE_VERSION VERSION_LESS 2.8.5)
+ set(CMAKE_INSTALL_BINDIR "bin" CACHE STRING "User executables (bin)")
+ set(CMAKE_INSTALL_LIBDIR "lib${LIB_SUFFIX}" CACHE STRING "Object code libraries (lib)")
+ set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE STRING "C header files (include)")
+ mark_as_advanced(CMAKE_INSTALL_BINDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR)
+else()
+ include(GNUInstallDirs)
+endif()
+
option(BUILD_GTEST "Builds the googletest subproject" OFF)
#Note that googlemock target already builds googletest
option(BUILD_GMOCK "Builds the googlemock subproject" ON)
+cmake_dependent_option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON "BUILD_GTEST OR BUILD_GMOCK" OFF)
+cmake_dependent_option(INSTALL_GMOCK "Enable installation of googlemock. (Projects embedding googlemock may want to turn this OFF.)" ON "BUILD_GMOCK" OFF)
+
if(BUILD_GMOCK)
add_subdirectory( googlemock )
elseif(BUILD_GTEST)