How to configure Clion to compile gtkmm project

后端 未结 1 502
南笙
南笙 2021-01-15 15:05

I have copied a sample project from GTK

#include 

int main(int argc, char *argv[])
{
    auto app = Gtk::Application::create(argc, argv, \"or         


        
相关标签:
1条回答
  • 2021-01-15 15:20

    Solved thanks to https://github.com/DreaminginCodeZH/gtkmmproject! Final CMakeLists.txt:

    cmake_minimum_required(VERSION 3.8)
    project(songbook)
    
    set(CMAKE_CXX_STANDARD 17)
    find_package(PkgConfig)
    pkg_check_modules(GTKMM gtkmm-3.0)
    
    include_directories(${GTKMM_INCLUDE_DIRS})
    link_directories(${GTKMM_LIBRARY_DIRS})
    
    set(SOURCE_FILES main.cpp MainWindow.cpp MainWindow.h)
    add_executable(songbook ${SOURCE_FILES})
    target_link_libraries(${CMAKE_PROJECT_NAME} ${GTKMM_LIBRARIES})
    
    0 讨论(0)
提交回复
热议问题