--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,7 +111,7 @@
 # special substitutions for pkgconfig files
 include(JoinPaths)
 join_paths(libdir_for_pc_file "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}")
-join_paths(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
+join_paths(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}${NAMESPACE_INSTALL_INCLUDEDIR}")
 configure_file(cmake/libxc.pc.in libxc.pc @ONLY)
 
 # extract project soversion from source
