(cmake, meson) append shared/static libraries flag by default when installing packages#6409
Merged
waruqi merged 1 commit intoxmake-io:devfrom May 9, 2025
Merged
Conversation
Member
Arthapz
commented
May 8, 2025
- Before adding new features and new modules, please go to issues to submit the relevant feature description first.
- Write good commit messages and use the same coding conventions as the rest of the project.
- Please commit code to dev branch and we will merge into master branch in feature
- Ensure your edited codes with four spaces instead of TAB.
- 增加新特性和新模块之前,请先到issues提交相关特性说明,经过讨论评估确认后,再进行相应的代码提交,避免做无用工作。
- 编写友好可读的提交信息,并使用与工程代码相同的代码规范,代码请用4个空格字符代替tab缩进。
- 请提交代码到dev分支,如果通过,我们会在特定时间合并到master分支上。
- 为了规范化提交日志的格式,commit消息,不要用中文,请用英文描述。
86f4c8f to
7047e17
Compare
waruqi
reviewed
May 8, 2025
| opt.cross = true | ||
| local envs = {} | ||
| envs.CMAKE_BUILD_TYPE = package:is_debug() and "Debug" or "Release" | ||
| envs.BUILD_SHARED_LIBS = package:config("shared") and "ON" or "OFF" |
Member
There was a problem hiding this comment.
why? _get_configs_for_generic will add them, and we need also check flags exist
Member
Author
There was a problem hiding this comment.
it doesn't seem to me that _get_configs_for_generic is called for cross
here it's generic OR cross
if package:is_cross() then
_get_configs_for_cross(package, configs, opt)
else
_get_configs_for_generic(package, configs, opt)
endxmake/xmake/modules/package/tools/cmake.lua
Line 488 in accf9cd
and here
xmake/xmake/modules/package/tools/cmake.lua
Line 940 in accf9cd
elseif package:is_cross() then
_get_configs_for_cross(package, configs, opt)
elseif package:config("toolchains") then
-- we still need find system libraries,
-- it just pass toolchain environments if the toolchain is compatible with host
if _is_toolchain_compatible_with_host(package) then
_get_configs_for_host_toolchain(package, configs, opt)
else
_get_configs_for_cross(package, configs, opt)
end
else
_get_configs_for_generic(package, configs, opt)
endand _get_configs_for_generic is not called from _get_configs_for_cross
or i miss something ?
waruqi
reviewed
May 8, 2025
7047e17 to
d2510d1
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.