想在package里面获取qt sdk的路径 #3098
Answered
by
waruqi
XimingCheng
asked this question in
Q&A
-
在编译额外的cmake package("Qt-Advanced-Docking-System")
add_deps("cmake")
add_urls("https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git")
add_versions("auto_hide_feature", "5a185268c44404e720fb751b011b13f8d3bc2d8b")
add_includedirs("src")
on_install(function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DCMAKE_PREFIX_PATH=" .. qt)
import("package.tools.cmake").install(package, configs)
end)
package_end() |
Beta Was this translation helpful? Give feedback.
Answered by
waruqi
Nov 23, 2022
Replies: 2 comments
-
如果走 xmake-repo 仓库的 qt5 包,可以参考 https://github.com/xmake-io/xmake-repo/blob/25d546a1792798b124b4177fb470fbcc54e86af7/packages/n/nodeeditor/xmake.lua#L25 如果走 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
XimingCheng
-
谢谢! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如果走 xmake-repo 仓库的 qt5 包,可以参考 https://github.com/xmake-io/xmake-repo/blob/25d546a1792798b124b4177fb470fbcc54e86af7/packages/n/nodeeditor/xmake.lua#L25
如果走
xmake f --qt=/xxx
自己设置 qt sdk 编译的,那就直接local qtsdk = get_config("qt")
取下