diff --git a/cmake/modules/DuneProject.cmake b/cmake/modules/DuneProject.cmake
index 80ae88346dc07e0d4824b337198e787c4dbab87b..299f46a3a459c437a14d2cfbf34bd0dd69a311ac 100644
--- a/cmake/modules/DuneProject.cmake
+++ b/cmake/modules/DuneProject.cmake
@@ -532,7 +532,9 @@ endif()")
   endif()
 
   # install pkg-config files
-  create_and_install_pkconfig(${DUNE_INSTALL_LIBDIR})
+  if(EXISTS ${PROJECT_SOURCE_DIR}/${ProjectName}.pc.in)
+    create_and_install_pkconfig(${DUNE_INSTALL_LIBDIR})
+  endif()
 
   ###########################
   ### HEADER CONFIG FILEs ###