1 2 3 4 5 6
find_package(Qt4 REQUIRED) find_package(Qt5Core REQUIRED) add_executable(mainexe main.cpp) target_link_libraries(mainexe Qt4::QtCore Qt5::Core)