File: install-pkgconfig-without-lib-for-cross-compile

package info (click to toggle)
dune-common 2.10.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,812 kB
  • sloc: cpp: 52,256; python: 3,979; sh: 1,658; makefile: 17
file content (22 lines) | stat: -rw-r--r-- 803 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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.
--- a/cmake/modules/DuneProject.cmake
+++ b/cmake/modules/DuneProject.cmake
@@ -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 ###