Skip to content

Commit fbf4c7e

Browse files
authored
Added ability to customize HTTP server module installation directory (#321)
1 parent 7085275 commit fbf4c7e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
2323

2424
set(ENABLE_MAN ON CACHE BOOL "Build man pages")
2525
set(ENABLE_TESTS OFF CACHE BOOL "Build test suite")
26+
set(CMAKE_INSTALL_MODULESDIR CACHE PATH "Apache HTTP Server module installation directory")
2627

2728
#-----------------------------------------------------------------------------
2829
#
@@ -105,6 +106,10 @@ execute_process(COMMAND ${APXS_EXECUTABLE} -q exp_libexecdir
105106
OUTPUT_STRIP_TRAILING_WHITESPACE
106107
)
107108

109+
if(NOT CMAKE_INSTALL_MODULESDIR)
110+
set(CMAKE_INSTALL_MODULESDIR ${HTTPD_MODULES_DIR})
111+
endif()
112+
108113
if(Cairo_FOUND)
109114
set(HAVE_CAIRO 1)
110115
endif()
@@ -160,7 +165,7 @@ install(
160165
render_old
161166
render_speedtest
162167
renderd
163-
LIBRARY DESTINATION ${HTTPD_MODULES_DIR}
168+
LIBRARY DESTINATION ${CMAKE_INSTALL_MODULESDIR}
164169
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
165170
)
166171

0 commit comments

Comments
 (0)