mirror of
https://github.com/openstreetmap/mod_tile.git
synced 2025-07-25 15:04:30 +00:00

For linting `CMakeLists.txt` & `*.cmake` files (`cmakelint`) as well as various other formats such as `HTML`, `MarkDown` & `YAML` (`prettier`.) ### Also: * Upgrade `actions/checkout` from `v3` to `v4` * Output coverage summary to GitHub Job step summary * Minor build docs cleanup for `CentOS` & `FreeBSD`
50 lines
1.3 KiB
CMake
50 lines
1.3 KiB
CMake
# - Find GLIB
|
|
# Find the GLIB includes and libraries.
|
|
# This module defines:
|
|
# GLIB_FOUND
|
|
# GLIB_INCLUDE_DIRS
|
|
# GLIB_LIBRARIES
|
|
|
|
find_package(PkgConfig QUIET)
|
|
pkg_check_modules(GLIB QUIET glib-2.0)
|
|
|
|
find_path(GLIB_INCLUDE_DIR
|
|
NAMES glib.h
|
|
PATHS ${GLIB_INCLUDE_DIRS}
|
|
PATH_SUFFIXES glib-2.0
|
|
)
|
|
|
|
if((NOT GLIB_INCLUDE_DIRS) AND (GLIB_INCLUDE_DIR))
|
|
set(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR})
|
|
elseif(GLIB_INCLUDE_DIRS AND GLIB_INCLUDE_DIR)
|
|
list(APPEND GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR})
|
|
endif()
|
|
|
|
find_library(GLIB_LIBRARY
|
|
NAMES ${GLIB_LIBRARIES} glib-2.0
|
|
)
|
|
|
|
if((NOT GLIB_LIBRARIES) AND (GLIB_LIBRARY))
|
|
set(GLIB_LIBRARIES ${GLIB_LIBRARY})
|
|
elseif(GLIB_LIBRARIES AND GLIB_LIBRARY)
|
|
list(APPEND GLIB_LIBRARIES ${GLIB_LIBRARY})
|
|
endif()
|
|
|
|
message(VERBOSE "GLIB_INCLUDE_DIRS=${GLIB_INCLUDE_DIRS}")
|
|
message(VERBOSE "GLIB_INCLUDE_DIR=${GLIB_INCLUDE_DIR}")
|
|
message(VERBOSE "GLIB_LIBRARIES=${GLIB_LIBRARIES}")
|
|
message(VERBOSE "GLIB_LIBRARY=${GLIB_LIBRARY}")
|
|
|
|
if((NOT GLIB_FOUND) AND (GLIB_INCLUDE_DIRS) AND (GLIB_LIBRARIES))
|
|
set(GLIB_FOUND True)
|
|
endif()
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(GLIB
|
|
FOUND_VAR GLIB_FOUND
|
|
REQUIRED_VARS GLIB_FOUND GLIB_INCLUDE_DIRS GLIB_LIBRARIES
|
|
VERSION_VAR GLIB_VERSION
|
|
)
|
|
|
|
mark_as_advanced(GLIB_INCLUDE_DIR GLIB_LIBRARY)
|