--- a/cmake/openblas.pc.in
+++ b/cmake/openblas.pc.in
@@ -1,8 +1,9 @@
-libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+prefix=@CMAKE_INSTALL_PREFIX@
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
 libnameprefix=@LIBNAMEPREFIX@
 libnamesuffix=@LIBNAMESUFFIX@
 libsuffix=@SUFFIX64_UNDERSCORE@
-includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
 
 openblas_config=USE_64BITINT=@INTERFACE64@ NO_CBLAS=@NO_CBLAS@ NO_LAPACK=@NO_LAPACK@ NO_LAPACKE=@NO_LAPACKE@ DYNAMIC_ARCH=@DYNAMIC_ARCH@ DYNAMIC_OLDER=@DYNAMIC_OLDER@ NO_AFFINITY=@NO_AFFINITY@ USE_OPENMP=@USE_OPENMP@ @CORE@ MAX_THREADS=@NUM_THREADS@ 
 Name: OpenBLAS
