I'm working with a large set of projects of which some are executables and the other libraries.
For the libraries to create unit tests is "easy" as the library can be bound to the test project by linker. I'm searching for an acceptable way to use the .pro and/or the .pri files the include the object files into the testing project.
All projects must build and run in Windows as well as in Linux. The .pro files are used by qmake to generate makefiles and .vcxproj files respectively.
Upto now I tried to put the .obj files into .pri or .pro files:
CONFIG(release, debug|release) {
OBJECTS += $${TESTED_PROJECT_DIR}/release/obj/sample.obj
} else {
OBJECTS += $${TESTED_PROJECT_DIR}/debug/obj/sample.obj
}
That produces makefiles, that look ok (containing the .objs) but there is nothing of them in the .vcxproj.
I also tried to generate a library additionally with the executables, that for now doesn't work as the library simply is put into vcxproj just as dependency.