From QMake to CMake. (Different path levels)

Your thePrintLibrary doesn’t link against any Qt libraries. Try adding the following to its CMakeLists.txt file:

target_link_libraries(thePrintLibrary PUBLIC Qt5::Core)