mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
1. If GTEST_ROOT and/or GMOCK_ROOT are defined, sources are expected somewhere inside these directories. Otherwise a CMake error is generated. Different source directory layouts are considered. 2. If GTEST_ROOT and GMOCK_ROOT are both not defined, sources are searched in /usr/src. Different source directory layouts are considered. 3. If sources are not found in one of the first two cases, preinstalled libraries are searched. Additionally using HINTS in function find_path() has been replaced by PATHS and PATH_SUFFIXES. According to CMake documentation in case of hard-coded guesses PATHS should be used. Remark: This reverts commit5f53e29, but instead NO_CMAKE_SYSTEM_PATH is used now to prevent CMake from searching in system paths. Hint: There was a special handling implemented regarding search for gmock-all.cc. This file was additionally searched in /usr/src/gmock directly instead of /usr/src/gmock/src (see commit1241b71). This special handling has been kept in case of searching sources in /usr/src/gmock, but not in case of searching sources in GMOCK_ROOT or GTEST_ROOT.