project(stm32flash) cmake_minimum_required(VERSION 2.8) find_package(PkgConfig REQUIRED) pkg_check_modules(GTK3 REQUIRED gtk+-3.0) aux_source_directory(. SRC_LIST) # GTK3 Dependencies include_directories(${GTK3_INCLUDE_DIRS}) link_directories(${GTK3_LIBRARY_DIRS}) add_definitions(${GTK3_CFLAGS_OTHER}) add_executable(${PROJECT_NAME} ${SRC_LIST}) # Add GTK Libraries to Linking list # Add lib pthread target_link_libraries(${PROJECT_NAME} ${GTK3_LIBRARIES} pthread)