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

Failed to run qt project #3614

Closed
star-hengxing opened this issue Apr 9, 2023 · 2 comments
Closed

Failed to run qt project #3614

star-hengxing opened this issue Apr 9, 2023 · 2 comments
Labels
Milestone

Comments

@star-hengxing
Copy link
Contributor

star-hengxing commented Apr 9, 2023

Xmake Version

v2.7.8+HEAD.87dff1ef4

Operating System Version and Architecture

Windows 10 Professional 21H2 19044.2364

Describe Bug

xmake run failed, because target runenvs without qt bindir path.

Expected Behavior

xmake run work.

Project Configuration

add_requires("vulkansdk")

target("qt")
    add_rules("qt.widgetapp")
    add_files("*.cpp")
    add_files("Widget.hpp")
    add_cxxflags("/Zc:__cplusplus", "/permissive-", {tools = "cl"})

    add_deps("shader")
    add_packages("vulkansdk")

    set_rundir("$(projectdir)")

    before_run(function (target)
        -- it work
        -- if is_plat("windows") then
        --     import("detect.sdks.find_qt")
        --     local qt = target:data("qt") or assert(find_qt(), "Qt SDK not found!")
        --     target:add("runenvs", "PATH", qt.bindir)
        -- end

        os.execv("xmake build " .. target:name())
    end)

Additional Information and Error Logs

xmake run doesn't execute rule qt.env on_config.

waruqi added a commit that referenced this issue Apr 9, 2023
@waruqi waruqi added this to the v2.7.9 milestone Apr 9, 2023
@waruqi
Copy link
Member

waruqi commented Apr 9, 2023

try it first. #3615

xmake update -s github:xmake-io/xmake#project

@star-hengxing
Copy link
Contributor Author

It works.

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

No branches or pull requests

2 participants