vmap/cmake/FindGTK3.cmake
2020-11-17 12:16:16 +01:00

21 lines
691 B
CMake

find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
if (GTK3_FIND_REQUIRED)
set(_pkgconfig_REQUIRED REQUIRED)
endif ()
pkg_check_modules(GTK3 ${_pkgconfig_REQUIRED} gtk+-3.0)
else ()
find_path(GTK3_INCLUDE_DIRS gtk.h)
# find_library(GTK3_LIBRARIES)
if (GTK3_INCLUDE_DIRS AND GTK3_LIBRARIES)
set(GTK3_FOUND 1)
if (NOT GTK3_FIND_QUIETLY)
message(STATUS "Found GTK3: ${GTK3_LIBRARIES}")
endif ()
elseif (GTK3_FIND_REQUIRED)
message(SEND_ERROR "Could not find GTK3")
elseif (NOT GTK3_FIND_QUIETLY)
message(STATUS "Could not find GTK3")
endif ()
endif ()
mark_as_advanced(GTK3_INCLUDE_DIRS GTK3_LIBRARIES)