]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3680] Fix generating .pc file when dependencies are not detected through pkg-config
authorAndrei Pavel <andrei@isc.org>
Wed, 18 Jun 2025 04:55:51 +0000 (07:55 +0300)
committerAndrei Pavel <andrei@isc.org>
Thu, 19 Jun 2025 14:45:34 +0000 (17:45 +0300)
meson.build:1051:4: ERROR: requires argument not a string, library with pkgconfig-generated file or pkgconfig-dependency object, got <ExternalLibrary log4cplus: True>

meson.build

index 228a6fff1c0e11d2846a8a724dd13cf38d414dae..4ca9053995c4ede6c1d844430afadfa31879a30a 100644 (file)
@@ -1042,21 +1042,21 @@ endif
 
 #### pkg-config
 
-additional_requires = []
-foreach i : [KRB5_DEP, MYSQL_DEP, POSTGRESQL_DEP]
+requires = []
+foreach i : [CRYPTO_DEP, KRB5_DEP, LOG4CPLUS_DEP, MYSQL_DEP, POSTGRESQL_DEP]
     if i.found() and i.type_name() == 'pkgconfig'
-        additional_requires += i
+        requires += i
     endif
 endforeach
 if NETCONF_DEP.found()
-    additional_requires += ['libyang', 'sysrepo', 'libyang-cpp', 'sysrepo-cpp']
+    requires += ['libyang', 'sysrepo', 'libyang-cpp', 'sysrepo-cpp']
 endif
 pkg.generate(
     description: 'High-performance, extensible DHCP server engine',
     filebase: 'kea',
     libraries: LIBS_BUILT_SO_FAR,
     name: 'Kea',
-    requires: [CRYPTO_DEP, LOG4CPLUS_DEP] + additional_requires,
+    requires: requires,
     subdirs: 'kea',
     version: meson.project_version(),
 )