diff options
author | Filipp Andjelo <filipp.andjelo@gmail.com> | 2018-10-11 12:09:57 (GMT) |
---|---|---|
committer | Filipp Andjelo <filipp.andjelo@hacon.de> | 2018-10-11 12:09:57 (GMT) |
commit | 095b3113e7438fd0be901e20b40d376bcd8ef860 (patch) | |
tree | b1c652716083c4ec945ac0a42061c3da1411ae2d /googletest/cmake | |
parent | 658c6390a5b363f46c6ad448ad1bce9d6e97e53a (diff) | |
download | googletest-095b3113e7438fd0be901e20b40d376bcd8ef860.zip googletest-095b3113e7438fd0be901e20b40d376bcd8ef860.tar.gz googletest-095b3113e7438fd0be901e20b40d376bcd8ef860.tar.bz2 |
Use pcfiledir for prefix in pkgconfig file
Using absolute paths in the pkg-config file makes it not relocatable and
leads to problems, when trying to use it with precompiled cross
toolchains. Setting prefix to relative path based on pcfiledir makes it
more reliable for such cases.
Diffstat (limited to 'googletest/cmake')
-rw-r--r-- | googletest/cmake/gtest.pc.in | 5 | ||||
-rw-r--r-- | googletest/cmake/gtest_main.pc.in | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/googletest/cmake/gtest.pc.in b/googletest/cmake/gtest.pc.in index e7967ad..9aae29e 100644 --- a/googletest/cmake/gtest.pc.in +++ b/googletest/cmake/gtest.pc.in @@ -1,5 +1,6 @@ -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=${pcfiledir}/../.. +libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ +includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ Name: gtest Description: GoogleTest (without main() function) diff --git a/googletest/cmake/gtest_main.pc.in b/googletest/cmake/gtest_main.pc.in index fe25d9c..915f297 100644 --- a/googletest/cmake/gtest_main.pc.in +++ b/googletest/cmake/gtest_main.pc.in @@ -1,5 +1,6 @@ -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=${pcfiledir}/../.. +libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ +includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ Name: gtest_main Description: GoogleTest (with main() function) |