CMakeLists.txt 595 B

12345678910111213141516171819
  1. cmake_minimum_required(VERSION 3.14)
  2. project(GTKCamera C)
  3. set(CMAKE_C_STANDARD 11)
  4. # Use the package PkgConfig to detect GTK+ headers/library files
  5. FIND_PACKAGE(PkgConfig REQUIRED)
  6. PKG_CHECK_MODULES(GTK3 REQUIRED gtk+-3.0)
  7. # Setup CMake to use GTK+, tell the compiler where to look for headers
  8. # and to the linker where to look for libraries
  9. INCLUDE_DIRECTORIES(${GTK3_INCLUDE_DIRS})
  10. LINK_DIRECTORIES(${GTK3_LIBRARY_DIRS})
  11. # Add other flags to the compiler
  12. ADD_DEFINITIONS(${GTK3_CFLAGS_OTHER})
  13. add_executable(GTKCamera main.c ini.c ini.h)
  14. target_link_libraries(GTKCamera ${GTK3_LIBRARIES})