On Sun, Apr 29, 2018 at 01:36:08PM +0200, David Kalnischkies wrote: > Not really knowledgeable enough about cmake through to know if that is > the best we can do ??? it looks kinda ugly/dirty.
Your patch looks fine to me. A slight improvement below avoids repeating the /usr/src path. > We could also switch to using the prebuilt library in libgtest-dev; it > is happily picked up if available (which is why I didn't notice before). > Not sure how the version constraints need to look to deal sanely with > the constant name-changing of gtests packaging through??? Yeah, sorry about that. If you are concerned with building in, say, stable then be aware that the prebuilt library does not exist in stable. So using the sources would be a better option. Here's a revised patch. diff -u -r apt-1.6.1/test/libapt/CMakeLists.txt apt-fix/test/libapt/CMakeLists.txt --- apt-1.6.1/test/libapt/CMakeLists.txt 2018-04-20 05:08:18.000000000 -0500 +++ apt-fix/test/libapt/CMakeLists.txt 2018-05-01 19:23:40.251529593 -0500 @@ -16,7 +16,7 @@ set(GTEST_LIBRARIES "-lgtest") set(GTEST_DEPENDENCIES "gtest") set(GTEST_FOUND TRUE) - find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h) + find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h PATHS ${GTEST_ROOT}/include) message(STATUS "Found GTest at ${GTEST_ROOT}, headers at ${GTEST_INCLUDE_DIRS}") endif() -Steve
signature.asc
Description: PGP signature