Mercurial > hg > orthanc
changeset 2160:2f2de941dff7
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sun, 20 Nov 2016 21:45:43 +0100 |
parents | cfaf2bea096e (diff) 728403a6ec1f (current diff) |
children | 7219cdce7bba |
files | |
diffstat | 1 files changed, 21 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/CMake/GoogleTestConfiguration.cmake Fri Nov 18 17:40:41 2016 +0100 +++ b/Resources/CMake/GoogleTestConfiguration.cmake Sun Nov 20 21:45:43 2016 +0100 @@ -1,9 +1,26 @@ if (USE_GTEST_DEBIAN_SOURCE_PACKAGE) - set(GTEST_SOURCES /usr/src/gtest/src/gtest-all.cc) - include_directories(/usr/src/gtest) + find_path(GTEST_DEBIAN_SOURCES_DIR + NAMES src/gtest-all.cc + PATHS + /usr/src/gtest + /usr/src/googletest/googletest + PATH_SUFFIXES src + ) - if (NOT EXISTS /usr/include/gtest/gtest.h OR - NOT EXISTS ${GTEST_SOURCES}) + find_path(GTEST_DEBIAN_INCLUDE_DIR + NAMES gtest.h + PATHS + /usr/include/gtest + ) + + message("Path to the Debian Google Test sources: ${GTEST_DEBIAN_SOURCES_DIR}") + message("Path to the Debian Google Test includes: ${GTEST_DEBIAN_INCLUDE_DIR}") + + set(GTEST_SOURCES ${GTEST_DEBIAN_SOURCES_DIR}/src/gtest-all.cc) + include_directories(${GTEST_DEBIAN_SOURCES_DIR}) + + if (NOT EXISTS ${GTEST_SOURCES} OR + NOT EXISTS ${GTEST_DEBIAN_INCLUDE_DIR}/gtest.h) message(FATAL_ERROR "Please install the libgtest-dev package") endif()