Advertisement
Mohamed_AIT_RAMI

Untitled

Jan 12th, 2019
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. # Set the name and the supported language of the project
  2. PROJECT(hello-world C)
  3. # Set the minimum version of cmake required to build this project
  4. CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
  5.  
  6. # Use the package PkgConfig to detect GTK+ headers/library files
  7. FIND_PACKAGE(PkgConfig REQUIRED)
  8. PKG_CHECK_MODULES(GTK3 REQUIRED gtk+-3.0)
  9.  
  10. # Setup CMake to use GTK+, tell the compiler where to look for headers
  11. # and to the linker where to look for libraries
  12. INCLUDE_DIRECTORIES(${GTK3_INCLUDE_DIRS})
  13. LINK_DIRECTORIES(${GTK3_LIBRARY_DIRS})
  14.  
  15. # Add other flags to the compiler
  16. ADD_DEFINITIONS(${GTK3_CFLAGS_OTHER})
  17.  
  18. # Add an executable compiled from hello.c
  19. ADD_EXECUTABLE(hello main.c)
  20.  
  21. # Link the target to the GTK+ libraries
  22. TARGET_LINK_LIBRARIES(hello ${GTK3_LIBRARIES})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement