cmake_minimum_required(VERSION 3.16) project(ScratchPad) set(CMAKE_CXX_STANDARD 17) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) find_package(Qt5 COMPONENTS Widgets REQUIRED) add_executable(ScratchPad main.cpp ) target_link_libraries(ScratchPad Qt5::Widgets) # Add at the end of existing CMakeLists.txt install(TARGETS ScratchPad RUNTIME DESTINATION bin ) install(FILES scratchpad.desktop DESTINATION share/applications ) install(FILES scratchpad.svg DESTINATION share/icons/hicolor/scalable/apps )