]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Using `module.modulemap` replace symbol link for public header 2858/head
authorLvv.me <cntrump@gmail.com>
Mon, 15 Nov 2021 05:23:50 +0000 (13:23 +0800)
committerLvv.me <cntrump@gmail.com>
Mon, 15 Nov 2021 05:23:50 +0000 (13:23 +0800)
Package.swift
lib/include/zstd.h [deleted symlink]
lib/modulemap/module.modulemap [new file with mode: 0644]

index 33587029a594f4f8e4971bfac289f59a56690d4e..75a5a0b3323eb9d4d84e6931ac564818b8104a64 100644 (file)
@@ -11,8 +11,8 @@ let package = Package(
     products: [
         // Products define the executables and libraries a package produces, and make them visible to other packages.
         .library(
-            name: "zstd",
-            targets: [ "zstd" ])
+            name: "libzstd",
+            targets: [ "libzstd" ])
     ],
     dependencies: [
         // Dependencies declare other packages that this package depends on.
@@ -22,10 +22,10 @@ let package = Package(
         // Targets are the basic building blocks of a package. A target can define a module or a test suite.
         // Targets can depend on other targets in this package, and on products in packages this package depends on.
         .target(
-            name: "zstd",
+            name: "libzstd",
             path: "lib",
             sources: [ "common", "compress", "decompress", "dictBuilder" ],
-            publicHeadersPath: "include",
+            publicHeadersPath: "modulemap",
             cSettings: [
                 .headerSearchPath(".")
             ])
diff --git a/lib/include/zstd.h b/lib/include/zstd.h
deleted file mode 120000 (symlink)
index 61fb364..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../zstd.h
\ No newline at end of file
diff --git a/lib/modulemap/module.modulemap b/lib/modulemap/module.modulemap
new file mode 100644 (file)
index 0000000..5e09fca
--- /dev/null
@@ -0,0 +1,4 @@
+module libzstd {
+    umbrella header "../zstd.h"
+    export *
+}