--- a/re2.pc.in
+++ b/re2.pc.in
@@ -1,5 +1,6 @@
-includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
-libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+prefix=@CMAKE_INSTALL_PREFIX@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
 
 Name: re2
 Description: RE2 is a fast, safe, thread-friendly regular expression engine.
