Files
openstreetmap-mod_tile-pyth…/cmake/FindAPR.cmake
Hummeltech 6d00447862 Improve test coverage (#384)
* Report coverage for almost all jobs
  * Some jobs fail and are omitted
* Add more tests to `gen_tile_test.cpp`
  * Also lightly cleaned up formatting
* Clean up cmake/* files
  * So they don't report an empty version
* Remove commented `check_*` lines from `CMakeLists.txt` file
  * These were left over from the initial CMake support implementation
2024-02-02 14:04:15 -07:00

56 lines
1.3 KiB
CMake

# - Find APR
# Find the APR includes and libraries.
# This module defines:
# APR_FOUND
# APR_INCLUDE_DIRS
# APR_LIBRARIES
find_package(PkgConfig QUIET)
pkg_check_modules(APR QUIET apr-1)
find_path(APR_INCLUDE_DIR
NAMES apr.h
PATHS ${APR_INCLUDE_DIRS}
PATH_SUFFIXES apr-1
)
if((NOT APR_INCLUDE_DIRS) AND (APR_INCLUDE_DIR))
set(APR_INCLUDE_DIRS ${APR_INCLUDE_DIR})
elseif(APR_INCLUDE_DIRS AND APR_INCLUDE_DIR)
list(APPEND APR_INCLUDE_DIRS ${APR_INCLUDE_DIR})
endif()
find_library(APR_LIBRARY
NAMES ${APR_LIBRARIES} apr-1
)
if((NOT APR_LIBRARIES) AND (APR_LIBRARY))
set(APR_LIBRARIES ${APR_LIBRARY})
elseif(APR_LIBRARIES AND APR_LIBRARY)
list(APPEND APR_LIBRARIES ${APR_LIBRARY})
endif()
message(VERBOSE "APR_INCLUDE_DIRS=${APR_INCLUDE_DIRS}")
message(VERBOSE "APR_INCLUDE_DIR=${APR_INCLUDE_DIR}")
message(VERBOSE "APR_LIBRARIES=${APR_LIBRARIES}")
message(VERBOSE "APR_LIBRARY=${APR_LIBRARY}")
if((NOT APR_FOUND) AND (APR_INCLUDE_DIRS) AND (APR_LIBRARIES))
set(APR_FOUND True)
endif()
include(FindPackageHandleStandardArgs)
if(APR_FOUND)
find_package_handle_standard_args(APR
REQUIRED_VARS APR_FOUND APR_INCLUDE_DIRS APR_LIBRARIES
VERSION_VAR APR_VERSION
)
else()
find_package_handle_standard_args(APR
REQUIRED_VARS APR_FOUND
)
endif()
mark_as_advanced(APR_INCLUDE_DIR APR_LIBRARY)