From 81b96205afb5b70dcbf292d48e07c0c66945285b Mon Sep 17 00:00:00 2001 From: "Lvv.me" Date: Mon, 15 Nov 2021 13:23:50 +0800 Subject: [PATCH] Using `module.modulemap` replace symbol link for public header --- Package.swift | 8 ++++---- lib/include/zstd.h | 1 - lib/modulemap/module.modulemap | 4 ++++ 3 files changed, 8 insertions(+), 5 deletions(-) delete mode 120000 lib/include/zstd.h create mode 100644 lib/modulemap/module.modulemap diff --git a/Package.swift b/Package.swift index 33587029a..75a5a0b33 100644 --- a/Package.swift +++ b/Package.swift @@ -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 index 61fb36420..000000000 --- a/lib/include/zstd.h +++ /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 index 000000000..5e09fca9e --- /dev/null +++ b/lib/modulemap/module.modulemap @@ -0,0 +1,4 @@ +module libzstd { + umbrella header "../zstd.h" + export * +} -- 2.47.2