[Backport] Clarify optional libraries and allow optionally disabling them (#453)

`libcurl` & `libcairo` are also optional and their usage can now be optionally disabled (along with `libmemcached` & `librados`.)

* No longer test macOS Autotools building
This commit is contained in:
Hummeltech
2024-06-28 13:51:12 -07:00
committed by David Hummel
parent 1f2a7f0b34
commit c0ff2f5895
3 changed files with 24 additions and 14 deletions

View File

@ -171,9 +171,6 @@ jobs:
on_default_branch:
- ${{ contains(github.ref, 'master') || contains(github.ref, 'develop') || contains(github.ref, 'CI') }}
include:
- os: macos-14
build_system: Autotools
compiler: LLVM
- os: macos-14
build_system: CMake
compiler: LLVM

View File

@ -25,9 +25,13 @@ set(CMAKE_CXX_STANDARD 11 CACHE STRING "Sets the C++ standard.")
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(THREADS_PREFER_PTHREAD_FLAG ON)
set(CMAKE_INSTALL_MODULESDIR CACHE PATH "Apache HTTP Server module installation directory")
set(ENABLE_MAN ON CACHE BOOL "Build man pages")
set(ENABLE_TESTS OFF CACHE BOOL "Build test suite")
set(CMAKE_INSTALL_MODULESDIR CACHE PATH "Apache HTTP Server module installation directory")
set(USE_CAIRO ON CACHE BOOL "Add cairo support if available (for `store_ro_composite.c` backend)")
set(USE_CURL ON CACHE BOOL "Add curl support if available (for `store_ro_http_proxy.c` backend)")
set(USE_MEMCACHED ON CACHE BOOL "Add memcached support if available (for `store_memcached.c` backend)")
set(USE_RADOS ON CACHE BOOL "Add rados support if available (for `store_rados.c` backend)")
#-----------------------------------------------------------------------------
#
@ -38,23 +42,32 @@ set(CMAKE_INSTALL_MODULESDIR CACHE PATH "Apache HTTP Server module installation
include(GNUInstallDirs)
# Packages
find_package(CURL)
find_package(ICU REQUIRED uc)
find_package(Threads REQUIRED)
find_package(APR REQUIRED)
find_package(CAIRO REQUIRED)
find_package(GLIB REQUIRED)
find_package(HTTPD REQUIRED)
find_package(INIPARSER REQUIRED)
find_package(LIBMAPNIK REQUIRED)
find_package(LIBMEMCACHED)
find_package(LIBRADOS)
if(LIBMAPNIK_VERSION VERSION_GREATER_EQUAL 4)
set(CMAKE_CXX_STANDARD 17)
endif()
if(USE_CURL)
find_package(CURL)
endif()
if(USE_CAIRO)
find_package(CAIRO)
endif()
if(USE_MEMCACHED)
find_package(LIBMEMCACHED)
endif()
if(USE_RADOS)
find_package(LIBRADOS)
endif()
# Programs
find_program(APXS_EXECUTABLE apxs REQUIRED)

View File

@ -22,19 +22,19 @@ Dependencies
------------
* `Supported Operating Systems`
* `GNU/Linux` (works best on Debian or Ubuntu)
* `FreeBSD`
* `GNU/Linux`
* `macOS`
* `Supported Build Systems`
* `GNU Autotools <https://www.gnu.org/software/software.html>`__
* `CMake <https://cmake.org/>`__
* `GNU Autotools <https://www.gnu.org/software/software.html>`__
* `Runtime/Build Dependencies`
* `Apache 2 HTTP webserver <https://httpd.apache.org/>`__
* `Mapnik <https://mapnik.org/>`__
* `Cairo 2D graphics library <https://cairographics.org/>`__
* `Curl library (SSL variant) <https://curl.haxx.se/>`__
* `Iniparser library <https://github.com/ndevilla/iniparser>`__
* `Cairo 2D graphics library (optional) <https://cairographics.org/>`__
* `Curl library (optional) <https://curl.haxx.se/>`__
* `GLib library <https://gitlab.gnome.org/GNOME/glib>`__
* `Iniparser library <https://github.com/ndevilla/iniparser>`__
* `Mapnik library <https://mapnik.org/>`__
* `Memcached library (optional) <https://libmemcached.org/>`__
* `RADOS library (optional) <https://docs.ceph.com/en/latest/rados/api/librados/>`__