Ignore:
Timestamp:
Sep 6, 2011, 1:03:39 PM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

Rename qmldir to qmldir.in and use qmake substitution for plugin name.

This makes sure that the plugin filename always matches the TARGET
specification. This also makes the copy2build hassle unneeded.

This commit supersedes r1053.

Suggested by Rudi Ihle.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/imports/qimportbase.pri

    r1053 r1057  
    1212}
    1313
    14 QMLDIRFILE = $${_PRO_FILE_PWD_}/qmldir
    15 qmldir2build.input = QMLDIRFILE
    16 qmldir2build.output = $$QT_BUILD_TREE/imports/$$TARGETPATH/qmldir
    17 !contains(TEMPLATE_PREFIX, vc):qmldir2build.variable_out = PRE_TARGETDEPS
    18 !isEmpty(TARGET_SHORT):qmldir2build.depends = $(MAKEFILE) # this adds dependency on this .pri
    19 !isEmpty(TARGET_SHORT):qmldir2build.commands = $$QMAKE_COPY_QMLDIR ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} $$TARGET $$TARGET_SHORT
    20 else:qmldir2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
    21 qmldir2build.name = COPY ${QMAKE_FILE_IN}
    22 qmldir2build.CONFIG += no_link
    23 # `clean' should leave the build in a runnable state, which means it shouldn't delete qmldir
    24 qmldir2build.CONFIG += no_clean
    25 QMAKE_EXTRA_COMPILERS += qmldir2build
     14!isEmpty(TARGET_SHORT):PLUGINFILENAME = $$TARGET_SHORT
     15else:PLUGINFILENAME = $$TARGET
     16
     17QMLDIRFILE.input = $${_PRO_FILE_PWD_}/qmldir.in
     18QMLDIRFILE.output = $$QT_BUILD_TREE/imports/$$TARGETPATH/qmldir
     19QMAKE_SUBSTITUTES += QMLDIRFILE
    2620
    2721TARGET = $$qtLibraryTarget($$TARGET)
     
    3832    load(armcc_warnings)
    3933}
     34
     35QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/$$TARGETPATH
     36target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
     37
     38qmldir.files += $$QMLDIRFILE.output
     39qmldir.path +=  $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
     40
     41INSTALLS += target qmldir
Note: See TracChangeset for help on using the changeset viewer.