How QT copies dependent files into the build directory in. Pro files

Source: Internet
Author: User
Tags regular expression win32

Add a piece of code to the pro file,

Definereplace (Win32path) {#定义替换

    Win32:1 ~= s|/|\\\\|g# will replace any value that matches the regular expression of the specified value
    Contains (1, ^\\.*):p FX = \ \ #如果value存在于一个被叫做variablename的变量的值的列表中, then succeeds, otherwise fails.
    ELSE:PFX =
    Segs = $ $split (1, \ \) #字符串分割
    out =
    For (SEG, segs) {
        Equals (SEG,..): O UT = $ $member (out, 0) #文档中member函数是只有两个参数的, returns the value of the specified position in the value list of the function
        Else:!equals (SEG,.): O UT + = $ $seg
    }
    Return ($ $join (out, \ \, $ $pfx))
}

win32{

Copydata.commands =$ (copy_file) $ $win 32Path ("$ $PWD/third-part/qxview/lib/qxviewd.dll") $ $win 32Path ("$ $OUT _pwd/ Debug ")

}

$ $PWD represents the path where the. Pro file is located, so $ $PWD represents the current path, followed by a path that relies on the library

$ $OUT _PWD represents the project's build path, which is the output path, which is copied under the Debug folder so that a debug is added later.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.