Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Odd behaviour of $$basename($$PWD)



  • Is it just me or there is something fundametally flawed within qmake?

    CHUNK OF PRO FILE
    @
    message($$PWD)
    FILE = $$PWD
    message($$basename(FILE))
    message($$basename($$PWD))
    @

    QMAKE OUTPUT
    @
    Project MESSAGE: /Users/ata2/workspace/starlab/plugins/plugin_surfacemesh_io_off
    Project MESSAGE: plugin_surfacemesh_io_off
    Project MESSAGE: @



  • Try this instead:
    @message($$PWD)
    FILE = $$PWD
    message($$basename(FILE))
    message($$basename(PWD))@



  • LoL that was dumb :)
    Thanks for pointing it out

    Still I find it a bit odd. I would have imagined that
    variables needed to be dereferenced when passing
    them to functions :\



  • That would lead to need to create separate variables for such functions as message() and warning().



  • Not sure I fully understand your argument here.
    Indeed we use
    @ message($$VARIABLE) @
    and not
    @ message(VARIABLE) @



  • Oh, sorry, i misread your previous post.


Log in to reply