I want to allow to optionally include additional features into a build and it seemed to me, that prf were made for that.

So I followed the docs http://doc.qt.io/qt-4.8/http://doc.qt.io/qt-5/qmake-advanced-usage.html and entered "CONFIG += pullout" into the additional qmake parameters text input field in the build options of QtCreator which resulted in the following qmake call in release mode:
Qt Code:
  1. qmake.exe C:\Tobias\n\QtGLWebcamDemo\QtGLWebcamDemo.pro -r -spec win32-msvc2010 "CONFIG += pullout"
To copy to clipboard, switch view to plain text mode 

pullout.prf
Qt Code:
  1. win32:CONFIG(release, debug|release): LIBS += -L$$PWD/libs/ -lPulloutDLL
  2. else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/libs/ -lPulloutDLL
  3. else:unix: LIBS += -L$$PWD/libs/ -lPulloutDLL
  4.  
  5. INCLUDEPATH += $$PWD/include
  6. DEPENDPATH += $$PWD/include
  7.  
  8. message("Libraries: AHDDDD")
  9. message("include path: $$INCLUDEPATH")
To copy to clipboard, switch view to plain text mode 

I placed several versions (with BBBB/CCCC instea of DDDD) into C:\Qt\5.4\msvc2010_opengl\mkspecs\win32-msvc2010 (which is QMAKESPEC), in the project folder and in a folder called features in the project folder.
When trying to build with QtCreator AHXXXX is being left out.

This made me create an empty .qmake.cache in the project folder, but that didn't help.

Though it somehow helped me for the case if I'm manually executing qmake on the commandline:
Qt Code:
  1. C:\Tobias\n\QtGLWebcamDemo>"C:\Qt\5.4\msvc2010_opengl\bin\qmake.exe" -makefile C
  2. :\Tobias\n\QtGLWebcamDemo\QtGLWebcamDemo.pro -r -spec win32-msvc2010 "CONFIG +=
  3. pullout"
  4. Project MESSAGE: Using win32 configuration
  5. Project MESSAGE: OpenCV path: C:/opencv
  6. Project MESSAGE: Includes path: C:/opencv/build/include/
  7. Project MESSAGE: Libraries: -LC:/opencv/build/x86/vc10/lib -lopencv_core2411 -lo
  8. pencv_highgui2411 -lopencv_imgproc2411 -lopencv_calib3d2411
  9. Project MESSAGE: Q MAKE SPEC: C:/Qt/5.4/msvc2010_opengl/mkspecs/win32-msvc2010
  10. Project MESSAGE: Q MAKE SPEC: C:/Tobias/n/QtGLWebcamDemo
  11. Project MESSAGE: Libraries: AHDDDD
  12. Project MESSAGE: include path: C:/opencv/build/include/ C:/Tobias/n/QtGLWebcamDe
  13. mo/features/include
  14. Project MESSAGE: Using win32 configuration
  15. Project MESSAGE: OpenCV path: C:/opencv
  16. Project MESSAGE: Includes path: C:/opencv/build/include/
  17. Project MESSAGE: Libraries: -LC:/opencv/build/x86/vc10/lib -lopencv_core2411 -lo
  18. pencv_highgui2411 -lopencv_imgproc2411 -lopencv_calib3d2411
  19. Project MESSAGE: Q MAKE SPEC: C:/Qt/5.4/msvc2010_opengl/mkspecs/win32-msvc2010
  20. Project MESSAGE: Q MAKE SPEC: C:/Tobias/n/QtGLWebcamDemo
  21. Project MESSAGE: Libraries: AHDDDD
  22. Project MESSAGE: include path: C:/opencv/build/include/ C:/Tobias/n/QtGLWebcamDe
  23. mo/features/include
  24. Project MESSAGE: Using win32 configuration
  25. Project MESSAGE: OpenCV path: C:/opencv
  26. Project MESSAGE: Includes path: C:/opencv/build/include/
  27. Project MESSAGE: Libraries: -LC:/opencv/build/x86/vc10/lib -lopencv_core2411d -l
  28. opencv_highgui2411d -lopencv_imgproc2411d -lopencv_calib3d2411d
  29. Project MESSAGE: Q MAKE SPEC: C:/Qt/5.4/msvc2010_opengl/mkspecs/win32-msvc2010
  30. Project MESSAGE: Q MAKE SPEC: C:/Tobias/n/QtGLWebcamDemo
  31. Project MESSAGE: Libraries: AHDDDD
  32. Project MESSAGE: include path: C:/opencv/build/include/ C:/Tobias/n/QtGLWebcamDe
  33. mo/features/include
To copy to clipboard, switch view to plain text mode 

AHDDDD is the pullout.prf in the features folder, but I would have expected it to be the pullout.prf in the project folder.
However this does not really help me since I do not know where I can find the makefiles generated from this call. They are not in the usual place.

I also tried to set the path to the .prf file with -set QMAKEFEATURES "C:\Tobias\n\QtGLWebcamDemo\"
which gave me this in both QtCreator and CLI:
Qt Code:
  1. C:\Tobias\n\QtGLWebcamDemo>"C:\Qt\5.4\msvc2010_opengl\bin\qmake.exe" C:\Tobias\n
  2. \QtGLWebcamDemo\QtGLWebcamDemo.pro -set QMAKEFEATURES "C:\Tobias\n\QtGLWebcamDem
  3. o\"
  4. ***Unknown option -set
  5. Usage: C:\Qt\5.4\msvc2010_opengl\bin\qmake.exe [mode] [options] [files]
  6.  
  7. QMake has two modes, one mode for generating project files based on
  8. some heuristics, and the other for generating makefiles. Normally you
  9. shouldn't need to specify a mode, as makefile generation is the default
  10. mode for qmake, but you may use this to test qmake on an existing project
  11.  
  12. Mode:
  13. -project Put qmake into project file generation mode
  14. In this mode qmake interprets files as files to
  15. be built,
  16. defaults to *; *; *; *.ts; *.xlf; *.qrc
  17. Note: The created .pro file probably will
  18. need to be edited. For example add the QT variable to
  19. specify what modules are required.
  20. -makefile Put qmake into makefile generation mode (default)
  21. In this mode qmake interprets files as project files to
  22. be processed, if skipped qmake will try to find a project
  23. file in your current working directory
  24.  
  25. Warnings Options:
  26. -Wnone Turn off all warnings; specific ones may be re-enabled by
  27. later -W options
  28. -Wall Turn on all warnings
  29. -Wparser Turn on parser warnings
  30. -Wlogic Turn on logic warnings (on by default)
  31. -Wdeprecated Turn on deprecation warnings (on by default)
  32.  
  33. Options:
  34. * You can place any variable assignment in options and it will be *
  35. * processed as if it was in [files]. These assignments will be parsed *
  36. * before [files]. *
  37. -o file Write output to file
  38. -d Increase debug level
  39. -t templ Overrides TEMPLATE as templ
  40. -tp prefix Overrides TEMPLATE so that prefix is prefixed into the value
  41. -help This help
  42. -v Version information
  43. -after All variable assignments after this will be
  44. parsed after [files]
  45. -norecursive Don't do a recursive search
  46. -recursive Do a recursive search
  47. -set <prop> <value> Set persistent property
  48. -unset <prop> Unset persistent property
  49. -query <prop> Query persistent property. Show all if <prop> is empty.
  50. -cache file Use file as cache [makefile mode only]
  51. -spec spec Use spec as QMAKESPEC [makefile mode only]
  52. -nocache Don't use a cache file [makefile mode only]
  53. -nodepend Don't generate dependencies [makefile mode only]
  54. -nomoc Don't generate moc targets [makefile mode only]
  55. -nopwd Don't look for files in pwd [project mode only]
To copy to clipboard, switch view to plain text mode 

Because it did not explicitely complain about not being able to find any prf file, I also tried it with load(pullout) in my .pro file (also tried with absolute/relative path, with and without .prf, with backwards and forward slashes)
but I could never load it... It did explicitely complain about not being able to find the path...hooray

Does anyone have an idea what I am doing wrong?