-
-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init * revise url * check nosimd * revise adding files * check simd support * fmt * fixup option * add_options("simd") * Update xmake.lua * Update xmake.lua * revise urls, ver * revise versioning * revise versioning --------- Co-authored-by: ruki <[email protected]>
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
add_rules("mode.debug", "mode.release") | ||
|
||
option("simd", {default = true, description = "Build with simd"}) | ||
|
||
target("pffft") | ||
set_kind("$(kind)") | ||
if not has_config("simd") then | ||
add_defines("PFFFT_SIMD_DISABLE") | ||
end | ||
if is_kind("shared") and is_plat("windows") then | ||
add_rules("utils.symbols.export_all") | ||
end | ||
add_files("fftpack.c", "pffft.c") | ||
add_headerfiles("fftpack.h", "pffft.h") | ||
if not is_plat("windows") then | ||
add_syslinks("m") | ||
else | ||
add_defines("_USE_MATH_DEFINES", {public = true}) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package("pffft") | ||
|
||
set_homepage("https://bitbucket.org/jpommier/pffft/") | ||
set_description("PFFFT, a pretty fast Fourier Transform.") | ||
set_license("BSD-like (FFTPACK license)") | ||
|
||
add_urls("https://bitbucket.org/jpommier/pffft/$(version)", {version = function (version) | ||
local hash = "02fe7715a5bf8bfd914681c53429600f94e0f536" | ||
if version:le("2024.11.29") then | ||
hash = "02fe7715a5bf8bfd914681c53429600f94e0f536" | ||
end | ||
return "get/" .. hash .. ".tar.gz" | ||
end}) | ||
add_versions("2024.11.29", "9adeb18ac7bb52e9fb921c31c0c6a4e9ae150cc6fcb20a899d4b3a2275176ded") | ||
|
||
add_configs("simd", {description = "Build with SIMD support.", default = true, type = "boolean"}) | ||
|
||
if not is_plat("windows") then | ||
add_syslinks("m") | ||
end | ||
|
||
on_install(function (package) | ||
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") | ||
local configs = {} | ||
configs.simd = package:config("simd") | ||
import("package.tools.xmake").install(package, configs) | ||
end) | ||
|
||
on_test(function (package) | ||
assert(package:has_cfuncs("pffft_simd_size", {includes = "pffft.h"})) | ||
end) |