Шаблон CMakeLists.txt для проекта

cmake_minimum_required(VERSION 3.16)

project(gtktest LANGUAGES CXX)

find_package(PkgConfig)
pkg_check_modules(GTKMM gtkmm-3.0)

add_executable(gtktest)

target_compile_features(gtktest PRIVATE cxx_std_17)

target_sources(gtktest PRIVATE main.cpp)

target_include_directories(gtktest PRIVATE ${GTKMM_INCLUDE_DIRS})

target_link_directories(gtktest PRIVATE ${GTKMM_LIBRARY_DIRS})

target_link_libraries(gtktest PRIVATE ${GTKMM_LIBRARIES})