https://bz.apache.org/bugzilla/show_bug.cgi?id=69968
Bug ID: 69968
Summary: CMake build on Windows doesn't update all macro tags
in the HTTPD configuration files
Product: Apache httpd-2
Version: 2.4.66
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Build
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
When building Apache HTTPD for Windows using CMake, there is a section of the
CMakeLists.txt file which is responsible for replacing the various @xyz@ tags
in the configuration template files.
However, when compared to the Makefile.win build method, which uses AWK script
installwinconf.awk to do the same thing, the CMake method is missing three
variables, namely exp_logfiledir, exp_runtimedir and exp_sysconfdir. These are
needed to update entries in the conf/extra/httpd-ssl.conf file, which are
consequently missed.
Further, the Apache Lounge HTTPD builds have traditionally defined the
${SRVROOT} macro in httpd.conf (since release 2.4.34), to simplify updating the
Apache install location. When building with CMake, this macro isn't used to
propagate the install prefix through the configuration files.
Applying the following unified diff file to the CMakeLists.txt file in the
current HTTPD 2.4.x branch, resolves both of these issues.
C:\Development\apache24\src\httpd-2.4.66>diff -u CMakeLists.txt
CMakeLists.txt.new
--- CMakeLists.txt Tue Nov 04 14:51:48 2025
+++ CMakeLists.txt.new Tue Mar 03 15:48:39 2026
@@ -925,12 +925,16 @@
SET(LoadModule "${LoadModules}")
SET(Port "80" CACHE STRING "http port to listen on")
SET(SSLPort "443" CACHE STRING "https port to listen on")
-SET(ServerRoot "${CMAKE_INSTALL_PREFIX}")
-SET(exp_cgidir "${CMAKE_INSTALL_PREFIX}/cgi-bin")
-SET(exp_htdocsdir "${CMAKE_INSTALL_PREFIX}/htdocs")
-SET(exp_iconsdir "${CMAKE_INSTALL_PREFIX}/icons")
-SET(exp_errordir "${CMAKE_INSTALL_PREFIX}/error")
-SET(exp_manualdir "${CMAKE_INSTALL_PREFIX}/manual")
+SET(exp_SRVROOT "${CMAKE_INSTALL_PREFIX}")
+SET(ServerRoot "\${SRVROOT}")
+SET(exp_cgidir "\${SRVROOT}/cgi-bin")
+SET(exp_htdocsdir "\${SRVROOT}/htdocs")
+SET(exp_iconsdir "\${SRVROOT}/icons")
+SET(exp_errordir "\${SRVROOT}/error")
+SET(exp_manualdir "\${SRVROOT}/manual")
+SET(exp_logfiledir "\${SRVROOT}/logs")
+SET(exp_runtimedir "\${SRVROOT}/logs")
+SET(exp_sysconfdir "\${SRVROOT}/conf")
SET(rel_logfiledir "logs")
SET(rel_runtimedir "logs")
SET(rel_sysconfdir "conf")
@@ -941,6 +945,8 @@
IF(template MATCHES ".conf.in$")
# substitute @var@/@@var@@ in .conf.in
STRING(REPLACE "@@" "@" template_text ${template_text})
+ STRING(REGEX REPLACE "(ServerRoot[ ]+\"[@]+ServerRoot[@]+\")"
+ "Define SRVROOT \"@exp_SRVROOT@\"\\n\\n\\1" template_text
${template_text})
STRING(CONFIGURE "${template_text}" template_text @ONLY)
ENDIF()
FILE(WRITE ${CMAKE_BINARY_DIR}/conf/original/${conf} "${template_text}")
Could these refinements be reviewed and considered please, so the configuration
files produced with the CMake build process matches those produced when using
Makefile.win?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]