From 6275b7e1bd29b3710dc82d8c0ba9fa93f79b57ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 24 Feb 2012 16:28:27 +0000 Subject: [PATCH] Set gtest dir also if prefix is given. git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@538 fdac6126-5c0c-442c-9429-916003d36597 --- cmake/FindGoogleTest.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/FindGoogleTest.cmake b/cmake/FindGoogleTest.cmake index 46da7757..6ae4bdff 100644 --- a/cmake/FindGoogleTest.cmake +++ b/cmake/FindGoogleTest.cmake @@ -35,6 +35,10 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES) find_library(_GTEST_MAIN_LIBRARY gtest_main PATHS "${GTEST_PREFIX}/lib" NO_DEFAULT_PATH) + + if ( _GTEST_LIBRARY ) + get_filename_component(_GTEST_LIBRARY_DIR ${_GTEST_LIBRARY} PATH CACHE ) + endif() else(GTEST_PREFIX) find_path(_GTEST_INCLUDE_DIR "gtest/gtest.h" PATHS