# Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) add_library(addressbar addressbar.cpp addressbar.h addressbar.ui completer.cpp completer.h urllineedit.cpp urllineedit.h ) target_link_libraries(addressbar Qt5::Widgets)