Changeset 393:7474bc7d2c7b in SMSSender


Ignore:
Timestamp:
Apr 30, 2014 4:56:59 PM (4 years ago)
Author:
Sämy Zehnder <saemy.zehnder@…>
Branch:
separation-frontend-backend
Message:
  • Changes additional_installs.pri (and adjusts the users of it) to require a from-path. This allows additional installs to be build out of absolute paths which is required when they are defined in the base library (but actually are included into a frontend project which invalidates local paths).
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • additional_installs.pri

    r391 r393  
    11# The following variables must be set:
    2 #   * ADDITIONAL_INSTALLS:       the to be installed headers
    3 #   * ADDITIONAL_INSTALLS_BASE:  path under /usr/include/smssender/ where the
    4 #                                headers should be placed.
     2#   * ADDITIONAL_INSTALLS.files: list of the to be installed files.
     3#   * ADDITIONAL_INSTALLS.from:  path from where the files should be copied.
     4#   * ADDITIONAL_INSTALLS.to:    path (usually under /usr/include/smssender/)
     5#                                where the files should be placed.
    56
    6 isEmpty(ADDITIONAL_INSTALLS_BASE) {
    7     error("ADDITIONAL_INSTALLS_BASE must be set when using additional_installs.pri")
     7isEmpty(ADDITIONAL_INSTALLS.from) {
     8    error("ADDITIONAL_INSTALLS.from must be set when using additional_installs.pri.")
     9}
     10isEmpty(ADDITIONAL_INSTALLS.to) {
     11    error("ADDITIONAL_INSTALLS.to must be set when using additional_installs.pri.")
    812}
    913
    10 for(header, ADDITIONAL_INSTALLS) {
    11     path = $${ADDITIONAL_INSTALLS_BASE}/$$dirname(header)
    12     eval(install_$${path}.files += $$header)
     14for(file, ADDITIONAL_INSTALLS.files) {
     15    path = $${ADDITIONAL_INSTALLS.to}/$$dirname(file)
     16    eval(install_$${path}.files += $${ADDITIONAL_INSTALLS.from}/$$file)
    1317    eval(install_$${path}.path = $$path)
    1418    eval(INSTALLS *= install_$${path})
     
    1923# Workaround for lupdate that keeps the values of a variable around and appends
    2024# new values to it even in the case of an assignment (foo = "" becomes foo += "")
     25unset(ADDITIONAL_INSTALLS.files)
     26unset(ADDITIONAL_INSTALLS.from)
     27unset(ADDITIONAL_INSTALLS.to)
    2128unset(ADDITIONAL_INSTALLS)
    22 unset(ADDITIONAL_INSTALLS_BASE)
  • common/common-base.pro

    r382 r393  
    107107
    108108install-dev-files:unix {
    109     ADDITIONAL_INSTALLS = $$HEADERS ../*.pri
    110     ADDITIONAL_INSTALLS_BASE = /usr/include/smssender/common
     109    ADDITIONAL_INSTALLS.files = $$HEADERS ../*.pri
     110    ADDITIONAL_INSTALLS.from = $$PWD
     111    ADDITIONAL_INSTALLS.to = /usr/include/smssender/common
    111112    include(../additional_installs.pri)
    112113}
  • common/gui/common-gui.pro

    r369 r393  
    4040
    4141install-dev-files:unix {
    42     ADDITIONAL_INSTALLS = $$HEADERS
    43     ADDITIONAL_INSTALLS -= $$HEADERS_BASE
    44     ADDITIONAL_INSTALLS_BASE = /usr/include/smssender/common/gui
     42    ADDITIONAL_INSTALLS.files = $$HEADERS
     43    ADDITIONAL_INSTALLS.files -= $$HEADERS_BASE
     44    ADDITIONAL_INSTALLS.from = $$PWD
     45    ADDITIONAL_INSTALLS.to = /usr/include/smssender/common/gui
    4546    include(../../additional_installs.pri)
    4647}
  • frontend/frontend-base.pro

    r390 r393  
    8484
    8585install-dev-files:unix {
    86     ADDITIONAL_INSTALLS = $$HEADERS
    87     ADDITIONAL_INSTALLS_BASE = /usr/include/smssender/frontend
     86    ADDITIONAL_INSTALLS.files = $$HEADERS
     87    ADDITIONAL_INSTALLS.from = $$PWD
     88    ADDITIONAL_INSTALLS.to = /usr/include/smssender/frontend
    8889    include(../additional_installs.pri)
    8990}
  • gateways/ETHZ/ethz-base.pro

    r366 r393  
    2525
    2626install-dev-files:unix {
    27     ADDITIONAL_INSTALLS = $$HEADERS
    28     ADDITIONAL_INSTALLS_BASE = /usr/include/smssender/gateways/ETHZ
     27    ADDITIONAL_INSTALLS.files = $$HEADERS
     28    ADDITIONAL_INSTALLS.from = $$PWD
     29    ADDITIONAL_INSTALLS.to = /usr/include/smssender/gateways/ETHZ
    2930    include(../../additional_installs.pri)
    3031}
  • gateways/Post/post-base.pro

    r376 r393  
    2424
    2525install-dev-files:unix {
    26     ADDITIONAL_INSTALLS = $$HEADERS
    27     ADDITIONAL_INSTALLS_BASE = /usr/include/smssender/gateways/Post
     26    ADDITIONAL_INSTALLS.files = $$HEADERS
     27    ADDITIONAL_INSTALLS.from = $$PWD
     28    ADDITIONAL_INSTALLS.to = /usr/include/smssender/gateways/Post
    2829    include(../../additional_installs.pri)
    2930}
  • gateways/Schoolnet/schoolnet-base.pro

    r366 r393  
    4545
    4646install-dev-files:unix {
    47     ADDITIONAL_INSTALLS = $$HEADERS
    48     ADDITIONAL_INSTALLS_BASE = /usr/include/smssender/gateways/Schoolnet
     47    ADDITIONAL_INSTALLS.files = $$HEADERS
     48    ADDITIONAL_INSTALLS.from = $$PWD
     49    ADDITIONAL_INSTALLS.to = /usr/include/smssender/gateways/Schoolnet
    4950    include(../../additional_installs.pri)
    5051}
  • gateways/Smartphone/smartphone-base.pro

    r366 r393  
    5454
    5555install-dev-files:unix {
    56     ADDITIONAL_INSTALLS = $$HEADERS
    57     ADDITIONAL_INSTALLS_BASE = /usr/include/smssender/gateways/Smartphone
     56    ADDITIONAL_INSTALLS.files = $$HEADERS
     57    ADDITIONAL_INSTALLS.from = $$PWD
     58    ADDITIONAL_INSTALLS.to = /usr/include/smssender/gateways/Smartphone
    5859    include(../../additional_installs.pri)
    5960}
  • gateways/Sunrise/sunrise-base.pro

    r366 r393  
    3434
    3535install-dev-files:unix {
    36     ADDITIONAL_INSTALLS = $$HEADERS
    37     ADDITIONAL_INSTALLS_BASE = /usr/include/smssender/gateways/Sunrise
     36    ADDITIONAL_INSTALLS.files = $$HEADERS
     37    ADDITIONAL_INSTALLS.from = $$PWD
     38    ADDITIONAL_INSTALLS.to = /usr/include/smssender/gateways/Sunrise
    3839    include(../../additional_installs.pri)
    3940}
  • gateways/common/gateways-common-base.pro

    r366 r393  
    3333
    3434install-dev-files:unix {
    35     ADDITIONAL_INSTALLS = ../*.pri $$HEADERS
    36     ADDITIONAL_INSTALLS_BASE = /usr/include/smssender/gateways/common
     35    ADDITIONAL_INSTALLS.files = ../*.pri $$HEADERS
     36    ADDITIONAL_INSTALLS.from = $$PWD
     37    ADDITIONAL_INSTALLS.to = /usr/include/smssender/gateways/common
    3738    include(../../additional_installs.pri)
    3839}
  • gateways/common/gui/gateways-common-gui.pro

    r386 r393  
    3232
    3333install-dev-files:unix {
    34     ADDITIONAL_INSTALLS = $$HEADERS
    35     ADDITIONAL_INSTALLS -= $$HEADERS_BASE
    36     ADDITIONAL_INSTALLS_BASE = /usr/include/smssender/gateways/common/gui
     34    ADDITIONAL_INSTALLS.files = $$HEADERS
     35    ADDITIONAL_INSTALLS.files -= $$HEADERS_BASE
     36    ADDITIONAL_INSTALLS.from = $$PWD
     37    ADDITIONAL_INSTALLS.to = /usr/include/smssender/gateways/common/gui
    3738    include(../../../additional_installs.pri)
    3839}
Note: See TracChangeset for help on using the changeset viewer.