I have simple project in QtCreator with cmake which uses gtk. So i set compiler flags to this :-
set(CMAKE_CXX_FLAGS " -std=c++14 `pkg-config --cflags --libs gtk+-3.0`")
but it does not compile and gives me following output:-
:-1: error: error: `pkg-config: No such file or directory
:-1: error: error: gtk+-3.0`: No such file or directory
:-1: error: error: unrecognized command line option ‘--cflags’
:-1: error: error: unrecognized command line option ‘--libs’
here is my cmake file:-
cmake_minimum_required(VERSION 2.8)
project(untitled1)
set(CMAKE_CXX_FLAGS " -std=c++14 `pkg-config --cflags --libs gtk+-3.0`")
FIND_PACKAGE(PkgConfig REQUIRED)
INCLUDE_DIRECTORIES(${GTK3_INCLUDE_DIRS})
LINK_DIRECTORIES(${GTK3_LIBRARY_DIRS})
add_executable(${PROJECT_NAME} "main.cpp")