project(keyedit LANGUAGES CXX)
set(QTREQUIRED ON)
set(CMAKE
AUTOMOC ON)
findpackage(Qt5 COMPONENTS Widgets Sql REQUIRED)
add
executable(keyedit ${keyeditsources})
target
link_libraries(keyedit Qt5::Core Qt5::Sql Qt5::Widgets)

This is a lot less unwieldy than autotools.