]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
meson: Fix contrib and tests build 4153/head
authorArtem Labazov <a.labazov@corp.vk.com>
Mon, 30 Sep 2024 15:05:57 +0000 (18:05 +0300)
committerArtem Labazov <a.labazov@corp.vk.com>
Mon, 30 Sep 2024 15:05:57 +0000 (18:05 +0300)
build/meson/contrib/pzstd/meson.build
build/meson/lib/meson.build
build/meson/tests/meson.build

index b95dc796463a11bf3c1b99a589b06a33849b3e9b..c3ee3d60a0e559850c5692516ba1dce4fc08fde2 100644 (file)
@@ -20,6 +20,6 @@ pzstd = executable('pzstd',
   pzstd_sources,
   cpp_args: pzstd_warning_flags,
   include_directories: pzstd_includes,
-  dependencies: [ libzstd_dep, thread_dep ],
+  dependencies: [ libzstd_internal_dep, thread_dep ],
   override_options: ['b_ndebug=true'],
   install: true)
index 6c5d53d1a7172de37794684d36f4903e10846dca..4ff926f9c3e07941aa8a53a43c993cc44e2fcce5 100644 (file)
@@ -134,7 +134,8 @@ libzstd_dep = declare_dependency(link_with: libzstd,
 # -fvisibility=hidden means those cannot be found
 if get_option('default_library') == 'static'
   libzstd_static = libzstd
-  libzstd_internal_dep = libzstd_dep
+  libzstd_internal_dep = declare_dependency(link_with: libzstd,
+      include_directories: libzstd_includes)
 else
   if get_option('default_library') == 'shared'
     libzstd_static = static_library('zstd_objlib',
@@ -147,11 +148,13 @@ else
   if cc_id == compiler_msvc
     # msvc does not actually support linking to both, but errors out with:
     #   error LNK2005: ZSTD_<foo> already defined in zstd.lib(zstd-1.dll)
-    libzstd_internal_dep = declare_dependency(link_with: libzstd_static)
+    libzstd_internal_dep = declare_dependency(link_with: libzstd_static,
+      include_directories: libzstd_includes)
   else
     libzstd_internal_dep = declare_dependency(link_with: libzstd,
       # the static library must be linked after the shared one
-      dependencies: declare_dependency(link_with: libzstd_static))
+      dependencies: declare_dependency(link_with: libzstd_static),
+      include_directories: libzstd_includes)
   endif
 endif
 
index 9847ab037382f9422111a240b90327db813162e8..71ffc50693d9b2dbd9c2d718cdfe69dbb70dcb48 100644 (file)
@@ -93,7 +93,7 @@ roundTripCrash = executable('roundTripCrash',
 longmatch_sources = [join_paths(zstd_rootdir, 'tests/longmatch.c')]
 longmatch = executable('longmatch',
   longmatch_sources,
-  dependencies: [ libzstd_dep ],
+  dependencies: [ libzstd_internal_dep ],
   install: false)
 
 invalidDictionaries_sources = [join_paths(zstd_rootdir, 'tests/invalidDictionaries.c')]