Skip to content

Commit c0ff2f5

Browse files
committed
[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
1 parent 1f2a7f0 commit c0ff2f5

3 files changed

Lines changed: 24 additions & 14 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@ jobs:
171171
on_default_branch:
172172
- ${{ contains(github.ref, 'master') || contains(github.ref, 'develop') || contains(github.ref, 'CI') }}
173173
include:
174-
- os: macos-14
175-
build_system: Autotools
176-
compiler: LLVM
177174
- os: macos-14
178175
build_system: CMake
179176
compiler: LLVM

CMakeLists.txt

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ set(CMAKE_CXX_STANDARD 11 CACHE STRING "Sets the C++ standard.")
2525
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2626
set(THREADS_PREFER_PTHREAD_FLAG ON)
2727

28+
set(CMAKE_INSTALL_MODULESDIR CACHE PATH "Apache HTTP Server module installation directory")
2829
set(ENABLE_MAN ON CACHE BOOL "Build man pages")
2930
set(ENABLE_TESTS OFF CACHE BOOL "Build test suite")
30-
set(CMAKE_INSTALL_MODULESDIR CACHE PATH "Apache HTTP Server module installation directory")
31+
set(USE_CAIRO ON CACHE BOOL "Add cairo support if available (for `store_ro_composite.c` backend)")
32+
set(USE_CURL ON CACHE BOOL "Add curl support if available (for `store_ro_http_proxy.c` backend)")
33+
set(USE_MEMCACHED ON CACHE BOOL "Add memcached support if available (for `store_memcached.c` backend)")
34+
set(USE_RADOS ON CACHE BOOL "Add rados support if available (for `store_rados.c` backend)")
3135

3236
#-----------------------------------------------------------------------------
3337
#
@@ -38,23 +42,32 @@ set(CMAKE_INSTALL_MODULESDIR CACHE PATH "Apache HTTP Server module installation
3842
include(GNUInstallDirs)
3943

4044
# Packages
41-
find_package(CURL)
4245
find_package(ICU REQUIRED uc)
4346
find_package(Threads REQUIRED)
4447

4548
find_package(APR REQUIRED)
46-
find_package(CAIRO REQUIRED)
4749
find_package(GLIB REQUIRED)
4850
find_package(HTTPD REQUIRED)
4951
find_package(INIPARSER REQUIRED)
5052
find_package(LIBMAPNIK REQUIRED)
51-
find_package(LIBMEMCACHED)
52-
find_package(LIBRADOS)
5353

5454
if(LIBMAPNIK_VERSION VERSION_GREATER_EQUAL 4)
5555
set(CMAKE_CXX_STANDARD 17)
5656
endif()
5757

58+
if(USE_CURL)
59+
find_package(CURL)
60+
endif()
61+
if(USE_CAIRO)
62+
find_package(CAIRO)
63+
endif()
64+
if(USE_MEMCACHED)
65+
find_package(LIBMEMCACHED)
66+
endif()
67+
if(USE_RADOS)
68+
find_package(LIBRADOS)
69+
endif()
70+
5871
# Programs
5972
find_program(APXS_EXECUTABLE apxs REQUIRED)
6073

README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ Dependencies
2222
------------
2323

2424
* `Supported Operating Systems`
25-
* `GNU/Linux` (works best on Debian or Ubuntu)
2625
* `FreeBSD`
26+
* `GNU/Linux`
2727
* `macOS`
2828
* `Supported Build Systems`
29-
* `GNU Autotools <https://www.gnu.org/software/software.html>`__
3029
* `CMake <https://cmake.org/>`__
30+
* `GNU Autotools <https://www.gnu.org/software/software.html>`__
3131
* `Runtime/Build Dependencies`
3232
* `Apache 2 HTTP webserver <https://httpd.apache.org/>`__
33-
* `Mapnik <https://mapnik.org/>`__
34-
* `Cairo 2D graphics library <https://cairographics.org/>`__
35-
* `Curl library (SSL variant) <https://curl.haxx.se/>`__
36-
* `Iniparser library <https://github.com/ndevilla/iniparser>`__
33+
* `Cairo 2D graphics library (optional) <https://cairographics.org/>`__
34+
* `Curl library (optional) <https://curl.haxx.se/>`__
3735
* `GLib library <https://gitlab.gnome.org/GNOME/glib>`__
36+
* `Iniparser library <https://github.com/ndevilla/iniparser>`__
37+
* `Mapnik library <https://mapnik.org/>`__
3838
* `Memcached library (optional) <https://libmemcached.org/>`__
3939
* `RADOS library (optional) <https://docs.ceph.com/en/latest/rados/api/librados/>`__
4040

0 commit comments

Comments
 (0)