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 the custom installation files for target #318

Closed
waruqi opened this Issue Jan 9, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@waruqi
Copy link
Member

waruqi commented Jan 9, 2019

Api

  • set_installdir
  • add_installfiles
    • set prefix directory, e.g. add_installfiles("src/*.h", {prefixdir = "xxx"})
    • install files with sub-directory structure, e.g. add_installfiles("src/(tbox/*.h)")

Examples

Install to the default system directory (platform.set_installdir()), e.g. /usr/local

target("test")
    -- install to /usr/local/*.h, /usr/local/*.md
    add_installfiles("src/*.h")
    add_installfiles("doc/*.md")

    -- install to /usr/local/include/*.h, /usr/local/share/doc/*.md
    add_installfiles("src/*.h", {prefixdir = "include"})
    add_installfiles("doc/*.md", {prefixdir = "share/doc"})

    -- install to /usr/local/include/tbox/*.h, /usr/local/share/doc/tbox/*.md
    add_installfiles("src/(tbox/*.h)", {prefixdir = "include"})
    add_installfiles("doc/(tbox/*.md)", {prefixdir = "share/doc"})

Install to the given directory: e.g. /xxx/yyy

target("test")

    -- set install directory
    set_installdir("/xxx/yyy")

    -- install to /xxx/yyy*.h, /xxx/yyy/*.md
    add_installfiles("src/*.h")
    add_installfiles("doc/*.md")

    -- install to /xxx/yyy/include/*.h, /xxx/yyy/share/doc/*.md
    add_installfiles("src/*.h", {prefixdir = "include"})
    add_installfiles("doc/*.md", {prefixdir = "share/doc"})

    -- install to /xxx/yyy/include/tbox/*.h, /xxx/yyy/share/doc/tbox/*.md
    add_installfiles("src/(tbox/*.h)", {prefixdir = "include"})
    add_installfiles("doc/(tbox/*.md)", {prefixdir = "share/doc"})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.