install-pkgconfig-without-lib-for-cross-compile
authorDebian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Fri, 22 Nov 2024 14:28:16 +0000 (15:28 +0100)
committerMarkus Blatt <markus@dr-blatt.de>
Fri, 22 Nov 2024 14:28:16 +0000 (15:28 +0100)
Install architecture independent pkgconfig file in /usr/share/pkgconfig

This prevents lintian warning pkg-config-unavailable-for-cross-compilation
for the header only modules dune-istl, dune-localfunctions, dune-functions,
and dune-typetree.

Gbp-Pq: Name install-pkgconfig-without-lib-for-cross-compile

cmake/modules/DuneProject.cmake

index 63d870a45c94790ed2b325a0a1f521d82ba3a72d..ea94e31b6a0407ac12cf9f410ead4a1f67e542cd 100644 (file)
@@ -532,8 +532,13 @@ endif()")
     install(FILES config.h.cmake DESTINATION share/${ProjectName})
   endif()
 
+  if(_has_lib)
+    set(DUNE_INSTALL_PKGCONFIGDIR ${CMAKE_INSTALL_LIBDIR})
+  else()
+    set(DUNE_INSTALL_PKGCONFIGDIR ${CMAKE_INSTALL_DATAROOTDIR})
+  endif()
   # install pkg-config files
-  create_and_install_pkconfig(${DUNE_INSTALL_LIBDIR})
+  create_and_install_pkconfig(${DUNE_INSTALL_PKGCONFIGDIR})
 
   ###########################
   ### HEADER CONFIG FILEs ###