summaryrefslogtreecommitdiff
path: root/libpkgconf/libpkgconf/buildfile
diff options
context:
space:
mode:
Diffstat (limited to 'libpkgconf/libpkgconf/buildfile')
-rw-r--r--libpkgconf/libpkgconf/buildfile10
1 files changed, 8 insertions, 2 deletions
diff --git a/libpkgconf/libpkgconf/buildfile b/libpkgconf/libpkgconf/buildfile
index 0296e64..14603e6 100644
--- a/libpkgconf/libpkgconf/buildfile
+++ b/libpkgconf/libpkgconf/buildfile
@@ -10,7 +10,10 @@ bsd = ($tclass == 'bsd')
macos = ($tclass == 'macos')
windows = ($tclass == 'windows')
-msvc = ($c.class == 'msvc')
+msvc_runtime = ($c.target.system == 'win32-msvc')
+
+msvc = ($c.class == 'msvc')
+clang_msvc = ($c.id == 'clang' && $msvc_runtime)
# Assign variables for the PKG_DEFAULT_PATH, SYSTEM_INCLUDEDIR, and
# SYSTEM_LIBDIR macro definitions. The whole idea feels utterly broken (hello
@@ -86,6 +89,9 @@ c.poptions =+ "-I$out_root" "-I$src_root"
if $msvc
c.coptions += /wd4996 /wd4267
+if $clang_msvc
+ c.coptions += -Wno-deprecated-declarations
+
# Note: this should go last as it adds obj target-specific poptions.
#
if! $windows
@@ -120,7 +126,7 @@ else
objs{*}: c.poptions += -DLIBPKGCONF_EXPORT
obja{*}: c.poptions += -DPKGCONFIG_IS_STATIC
- c.libs += $regex.apply(advapi32, '(.+)', $msvc ? '\1.lib' : '-l\1')
+ c.libs += ($msvc_runtime ? advapi32.lib : -ladvapi32)
}
# Export options.