build: see if env GETST_ROOT exists
# ~~~
if (NOT GOOGLETEST_ROOT)
+ # if GTEST_ROOT is not set but ENV GTEST_ROOT exists use the ENV var
+ if (GTEST_ROOT STREQUAL "")
+ if (NOT ($ENV{GTEST_ROOT} STREQUAL ""))
+ set (GTEST_ROOT "$ENV{GTEST_ROOT}")
+ endif ()
+ endif ()
if (NOT (GTEST_ROOT STREQUAL ""))
if (EXISTS ${GTEST_ROOT}/CMakeLists.txt)
set (GOOGLETEST_ROOT "${GTEST_ROOT}" CACHE INTERNAL "Path to a local copy of Google Test" FORCE)
