title: How to include `pkg-config --cflags --libs gtk+-2.0` in CXX_FLAGS of CMake
body: <p>This is the CFLAGS in the Makefile.</p>
  
  <pre><code>CFLAGS = -I/usr/include/libglade-2.0 -I/usr/include/gsl `pkg-config --cflags --libs gtk+-2.0` -lglade-2.0 -lglut -I/usr/local/include/dc1394 -ldc1394
  </code></pre>
  
  <p>I want to use CMAKE rather than Makefile. This part of the CMakeLists.txt file I wrote.</p>
  
  <pre><code>find_package(PkgConfig REQUIRED)
  pkg_check_modules(GTK REQUIRED "gtk+-2.0")
  
  # Add the path to its header files to the compiler command line
  include_directories(${GTK_INCLUDE_DIRS})
  link_directories(${GTK_LIBRARY_DIRS})
  
  # Add any compiler flags it requires
  # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GTK_CFLAGS}")
  
  # Add the makefile target for your executable and link in the GTK library
  target_link_libraries(${CMAKE_PROJECT_NAME} ${GTK_LIBRARIES})
  
  # gtk and glade
  find_package(GTK2 2.10 REQUIRED gtk glade)
  if(GTK2_FOUND)
     include_directories(${GTK2_INCLUDE_DIRS})
     target_link_libraries(${CMAKE_PROJECT_NAME} ${GTK2_LIBRARIES})
  endif()
  </code></pre>
  
  <p>My question is how to combine </p>
  
  <pre><code>`pkg-config --cflags --libs gtk+-2.0` 
  </code></pre>
  
  <p>in CXX_FLAGS. I have searched a lot but cannot find an answer. Please help.</p>