Change search strategy for prebuilt GoogleTest/GoogleMock libraries

Prebuilt GoogleTest/GoogleMock libraries are now only searched, if
GoogleTest source code wasn't found.
This commit is contained in:
Christian Gruber
2019-08-17 23:03:45 +02:00
parent cbd6dea4ba
commit 7e71a9724f
2 changed files with 26 additions and 23 deletions

View File

@@ -72,7 +72,7 @@ add_dependencies(check scm-test-core)
gnc_add_scheme_deprecated_module ("gnucash unittest-support" "tests unittest-support" "scm-test-core" "")
if(NOT GTEST_SHARED_LIB)
if (GTEST_SRC_DIR)
# in contrast to GoogleTest build system libraries libgtest.a and libgtest_main.a
# are combined to one library libtest.a here
add_library(gtest STATIC ${lib_gtest_SOURCES})
@@ -83,7 +83,7 @@ if(NOT GTEST_SHARED_LIB)
endif()
target_include_directories(gtest PUBLIC ${GTEST_INCLUDE_DIR} ${GTEST_SRC_DIR})
endif()
if(NOT GMOCK_SHARED_LIB)
if (GMOCK_SRC_DIR)
set (lib_gmock_SOURCES ${GMOCK_SRC})
add_library(gmock STATIC ${lib_gmock_SOURCES})
if (APPLE)