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:
qmake.exe C:\Tobias\n\QtGLWebcamDemo\QtGLWebcamDemo.pro -r -spec win32-msvc2010 "CONFIG += pullout"
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
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/libs/ -lPulloutDLL
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/libs/ -lPulloutDLL
else:unix: LIBS += -L$$PWD/libs/ -lPulloutDLL
INCLUDEPATH += $$PWD/include
DEPENDPATH += $$PWD/include
message("Libraries: AHDDDD")
message("include path: $$INCLUDEPATH")
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/libs/ -lPulloutDLL
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/libs/ -lPulloutDLL
else:unix: LIBS += -L$$PWD/libs/ -lPulloutDLL
INCLUDEPATH += $$PWD/include
DEPENDPATH += $$PWD/include
message("Libraries: AHDDDD")
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:
C:\Tobias\n\QtGLWebcamDemo>"C:\Qt\5.4\msvc2010_opengl\bin\qmake.exe" -makefile C
:\Tobias\n\QtGLWebcamDemo\QtGLWebcamDemo.pro -r -spec win32-msvc2010 "CONFIG +=
pullout"
Project MESSAGE: Using win32 configuration
Project MESSAGE: OpenCV path: C:/opencv
Project MESSAGE: Includes path: C:/opencv/build/include/
Project MESSAGE: Libraries: -LC:/opencv/build/x86/vc10/lib -lopencv_core2411 -lo
pencv_highgui2411 -lopencv_imgproc2411 -lopencv_calib3d2411
Project MESSAGE: Q MAKE SPEC: C:/Qt/5.4/msvc2010_opengl/mkspecs/win32-msvc2010
Project MESSAGE: Q MAKE SPEC: C:/Tobias/n/QtGLWebcamDemo
Project MESSAGE: Libraries: AHDDDD
Project MESSAGE: include path: C:/opencv/build/include/ C:/Tobias/n/QtGLWebcamDe
mo/features/include
Project MESSAGE: Using win32 configuration
Project MESSAGE: OpenCV path: C:/opencv
Project MESSAGE: Includes path: C:/opencv/build/include/
Project MESSAGE: Libraries: -LC:/opencv/build/x86/vc10/lib -lopencv_core2411 -lo
pencv_highgui2411 -lopencv_imgproc2411 -lopencv_calib3d2411
Project MESSAGE: Q MAKE SPEC: C:/Qt/5.4/msvc2010_opengl/mkspecs/win32-msvc2010
Project MESSAGE: Q MAKE SPEC: C:/Tobias/n/QtGLWebcamDemo
Project MESSAGE: Libraries: AHDDDD
Project MESSAGE: include path: C:/opencv/build/include/ C:/Tobias/n/QtGLWebcamDe
mo/features/include
Project MESSAGE: Using win32 configuration
Project MESSAGE: OpenCV path: C:/opencv
Project MESSAGE: Includes path: C:/opencv/build/include/
Project MESSAGE: Libraries: -LC:/opencv/build/x86/vc10/lib -lopencv_core2411d -l
opencv_highgui2411d -lopencv_imgproc2411d -lopencv_calib3d2411d
Project MESSAGE: Q MAKE SPEC: C:/Qt/5.4/msvc2010_opengl/mkspecs/win32-msvc2010
Project MESSAGE: Q MAKE SPEC: C:/Tobias/n/QtGLWebcamDemo
Project MESSAGE: Libraries: AHDDDD
Project MESSAGE: include path: C:/opencv/build/include/ C:/Tobias/n/QtGLWebcamDe
mo/features/include
C:\Tobias\n\QtGLWebcamDemo>"C:\Qt\5.4\msvc2010_opengl\bin\qmake.exe" -makefile C
:\Tobias\n\QtGLWebcamDemo\QtGLWebcamDemo.pro -r -spec win32-msvc2010 "CONFIG +=
pullout"
Project MESSAGE: Using win32 configuration
Project MESSAGE: OpenCV path: C:/opencv
Project MESSAGE: Includes path: C:/opencv/build/include/
Project MESSAGE: Libraries: -LC:/opencv/build/x86/vc10/lib -lopencv_core2411 -lo
pencv_highgui2411 -lopencv_imgproc2411 -lopencv_calib3d2411
Project MESSAGE: Q MAKE SPEC: C:/Qt/5.4/msvc2010_opengl/mkspecs/win32-msvc2010
Project MESSAGE: Q MAKE SPEC: C:/Tobias/n/QtGLWebcamDemo
Project MESSAGE: Libraries: AHDDDD
Project MESSAGE: include path: C:/opencv/build/include/ C:/Tobias/n/QtGLWebcamDe
mo/features/include
Project MESSAGE: Using win32 configuration
Project MESSAGE: OpenCV path: C:/opencv
Project MESSAGE: Includes path: C:/opencv/build/include/
Project MESSAGE: Libraries: -LC:/opencv/build/x86/vc10/lib -lopencv_core2411 -lo
pencv_highgui2411 -lopencv_imgproc2411 -lopencv_calib3d2411
Project MESSAGE: Q MAKE SPEC: C:/Qt/5.4/msvc2010_opengl/mkspecs/win32-msvc2010
Project MESSAGE: Q MAKE SPEC: C:/Tobias/n/QtGLWebcamDemo
Project MESSAGE: Libraries: AHDDDD
Project MESSAGE: include path: C:/opencv/build/include/ C:/Tobias/n/QtGLWebcamDe
mo/features/include
Project MESSAGE: Using win32 configuration
Project MESSAGE: OpenCV path: C:/opencv
Project MESSAGE: Includes path: C:/opencv/build/include/
Project MESSAGE: Libraries: -LC:/opencv/build/x86/vc10/lib -lopencv_core2411d -l
opencv_highgui2411d -lopencv_imgproc2411d -lopencv_calib3d2411d
Project MESSAGE: Q MAKE SPEC: C:/Qt/5.4/msvc2010_opengl/mkspecs/win32-msvc2010
Project MESSAGE: Q MAKE SPEC: C:/Tobias/n/QtGLWebcamDemo
Project MESSAGE: Libraries: AHDDDD
Project MESSAGE: include path: C:/opencv/build/include/ C:/Tobias/n/QtGLWebcamDe
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:
C:\Tobias\n\QtGLWebcamDemo>"C:\Qt\5.4\msvc2010_opengl\bin\qmake.exe" C:\Tobias\n
\QtGLWebcamDemo\QtGLWebcamDemo.pro -set QMAKEFEATURES "C:\Tobias\n\QtGLWebcamDem
o\"
***Unknown option -set
Usage: C:\Qt\5.4\msvc2010_opengl\bin\qmake.exe [mode] [options] [files]
QMake has two modes, one mode for generating project files based on
some heuristics, and the other for generating makefiles. Normally you
shouldn't need to specify a mode, as makefile generation is the default
mode for qmake, but you may use this to test qmake on an existing project
Mode:
-project Put qmake into project file generation mode
In this mode qmake interprets files as files to
be built,
defaults to *; *; *; *.ts; *.xlf; *.qrc
Note: The created .pro file probably will
need to be edited. For example add the QT variable to
specify what modules are required.
-makefile Put qmake into makefile generation mode (default)
In this mode qmake interprets files as project files to
be processed, if skipped qmake will try to find a project
file in your current working directory
Warnings Options:
-Wnone Turn off all warnings; specific ones may be re-enabled by
later -W options
-Wall Turn on all warnings
-Wparser Turn on parser warnings
-Wlogic Turn on logic warnings (on by default)
-Wdeprecated Turn on deprecation warnings (on by default)
Options:
* You can place any variable assignment in options and it will be *
* processed as if it was in [files]. These assignments will be parsed *
* before [files]. *
-o file Write output to file
-d Increase debug level
-t templ Overrides TEMPLATE as templ
-tp prefix Overrides TEMPLATE so that prefix is prefixed into the value
-help This help
-v Version information
-after All variable assignments after this will be
parsed after [files]
-norecursive Don't do a recursive search
-recursive Do a recursive search
-set <prop> <value> Set persistent property
-unset <prop> Unset persistent property
-query <prop> Query persistent property. Show all if <prop> is empty.
-cache file Use file as cache [makefile mode only]
-spec spec Use spec as QMAKESPEC [makefile mode only]
-nocache Don't use a cache file [makefile mode only]
-nodepend Don't generate dependencies [makefile mode only]
-nomoc Don't generate moc targets [makefile mode only]
-nopwd Don't look for files in pwd [project mode only]
C:\Tobias\n\QtGLWebcamDemo>"C:\Qt\5.4\msvc2010_opengl\bin\qmake.exe" C:\Tobias\n
\QtGLWebcamDemo\QtGLWebcamDemo.pro -set QMAKEFEATURES "C:\Tobias\n\QtGLWebcamDem
o\"
***Unknown option -set
Usage: C:\Qt\5.4\msvc2010_opengl\bin\qmake.exe [mode] [options] [files]
QMake has two modes, one mode for generating project files based on
some heuristics, and the other for generating makefiles. Normally you
shouldn't need to specify a mode, as makefile generation is the default
mode for qmake, but you may use this to test qmake on an existing project
Mode:
-project Put qmake into project file generation mode
In this mode qmake interprets files as files to
be built,
defaults to *; *; *; *.ts; *.xlf; *.qrc
Note: The created .pro file probably will
need to be edited. For example add the QT variable to
specify what modules are required.
-makefile Put qmake into makefile generation mode (default)
In this mode qmake interprets files as project files to
be processed, if skipped qmake will try to find a project
file in your current working directory
Warnings Options:
-Wnone Turn off all warnings; specific ones may be re-enabled by
later -W options
-Wall Turn on all warnings
-Wparser Turn on parser warnings
-Wlogic Turn on logic warnings (on by default)
-Wdeprecated Turn on deprecation warnings (on by default)
Options:
* You can place any variable assignment in options and it will be *
* processed as if it was in [files]. These assignments will be parsed *
* before [files]. *
-o file Write output to file
-d Increase debug level
-t templ Overrides TEMPLATE as templ
-tp prefix Overrides TEMPLATE so that prefix is prefixed into the value
-help This help
-v Version information
-after All variable assignments after this will be
parsed after [files]
-norecursive Don't do a recursive search
-recursive Do a recursive search
-set <prop> <value> Set persistent property
-unset <prop> Unset persistent property
-query <prop> Query persistent property. Show all if <prop> is empty.
-cache file Use file as cache [makefile mode only]
-spec spec Use spec as QMAKESPEC [makefile mode only]
-nocache Don't use a cache file [makefile mode only]
-nodepend Don't generate dependencies [makefile mode only]
-nomoc Don't generate moc targets [makefile mode only]
-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?
Bookmarks