Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add libatomic_ops #4479

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

heheda123123
Copy link
Contributor

No description provided.

packages/l/libatomic_ops/xmake.lua Show resolved Hide resolved
add_urls("https://github.com/ivmai/libatomic_ops/releases/download/v$(version)/libatomic_ops-$(version).tar.gz",
"https://github.com/ivmai/libatomic_ops.git")

add_versions("7.8.2", "d305207fe207f2b3fb5cb4c019da12b44ce3fcbc593dfd5080d867b1a2419b51")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

packages/l/libatomic_ops/xmake.lua Outdated Show resolved Hide resolved
on_install(function (package)
local configs = {}
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你可以把这个头文件拷贝下来看看,最终这个宏的值是什么,就知道为什么大部分包都要 package:add(defines

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你是指给使用者加AO_API?

Copy link
Contributor

@star-hengxing star-hengxing Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake 里面的宏,xmake 不能自动获取,只能包维护者手动加上。
这里我们只需要在 Windows plat 和 shared 的情况下,add defines ao_api=__declspec(dllimport) 或 ao_dll,保证函数都被 __declspec(dllimport) 修饰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants