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

qmake : No rule to make target Stop.



  • I have a project which has an app and test. Both App and test depends on a common lib (which is submodule for the app). Here is my project structure.

    |
    |_ _Application.pro
    |_ _App/app.pro
    |_ _lib/lib.pro
    |_ _TestSuite/
                 |_ _Test.pro
    
    
    #Application.pro 
    
    
    TEMPLATE = subdirs
    SUBDIRS +=  app \
                lib
    
    #subdirs
    lib.file = $${PWD}/lib/lib.pro
    app.file = $${PWD}/App/app.pro
    
    #dependecies
    app.depends  =  lib
    
    QMAKE_CLEAN += $${OUT_PWD}/Makefile*
    
    #Test.pro 
    
    
    TEMPLATE = subdirs
    SUBDIRS +=  Test \
                lib
    
    #subdirs
    lib.file = $${PWD}/../lib/lib.pro
    app.file = $${PWD}/TestSuite/Test.pro
    
    #dependecies
    Test.depends  =  lib
    
    QMAKE_CLEAN += $${OUT_PWD}/Makefile*
    

    The application compiles fine, but when I run make on test it throws No rule to make target lib.pro needed by Test.pro Stop error.

    If I copy the lib files under TestSuite then it works perfectly. So is it mandatory that subdirs should a subdirectory of the current application?


  • Lifetime Qt Champion