@@ -92,7 +92,6 @@ include(CheckSymbolExists)
9292include (CMakePushCheckState)
9393include (FeatureSummary)
9494include (PHP/SearchLibraries)
95- include (PHP/Set)
9695
9796################################################################################
9897# FPM configuration.
@@ -105,70 +104,63 @@ add_feature_info(
105104 "FastCGI Process Manager"
106105)
107106
108- php_set (
109- PHP_SAPI_FPM_USER
107+ set (
108+ CACHE { PHP_SAPI_FPM_USER}
110109 TYPE STRING
111- IF PHP_SAPI_FPM
110+ HELP "Set the user for running PHP FPM (default: nobody)"
112111 VALUE "nobody"
113- DOC "Set the user for running PHP FPM (default: nobody)"
114112)
115113
116- php_set (
117- PHP_SAPI_FPM_GROUP
114+ set (
115+ CACHE { PHP_SAPI_FPM_GROUP}
118116 TYPE STRING
119- IF PHP_SAPI_FPM
120- VALUE "nobody"
121- DOC
117+ HELP
122118 "Set the group for running PHP FPM. For a system user, this should usually "
123119 "be set to match the FPM username (default: nobody)"
120+ VALUE "nobody"
124121)
125122
126- php_set(
127- PHP_SAPI_FPM_ACL
128- TYPE BOOL
129- IF [[PHP_SAPI_FPM AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin"]]
130- VALUE OFF
131- DOC "Use POSIX Access Control Lists"
132- )
123+ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
124+ set (PHP_SAPI_FPM_ACL FALSE )
125+ else ()
126+ option (PHP_SAPI_FPM_ACL "Use POSIX Access Control Lists" )
127+ endif ()
133128add_feature_info(
134129 "sapi/fpm ACL"
135130 PHP_SAPI_FPM_ACL
136131 "POSIX Access Control Lists integration"
137132)
138133
139- php_set(
140- PHP_SAPI_FPM_APPARMOR
141- TYPE BOOL
142- IF [[PHP_SAPI_FPM AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin"]]
143- VALUE OFF
144- DOC "Enable the AppArmor confinement through libapparmor"
145- )
134+ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
135+ set (PHP_SAPI_FPM_APPARMOR FALSE )
136+ else ()
137+ option (
138+ PHP_SAPI_FPM_APPARMOR
139+ "Enable the AppArmor confinement through libapparmor"
140+ )
141+ endif ()
146142add_feature_info(
147143 "sapi/fpm AppArmor"
148144 PHP_SAPI_FPM_APPARMOR
149145 "application confinement integration"
150146)
151147
152- php_set(
153- PHP_SAPI_FPM_SELINUX
154- TYPE BOOL
155- IF [[PHP_SAPI_FPM AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin"]]
156- VALUE OFF
157- DOC "Enable the SELinux policy library support"
158- )
148+ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
149+ set (PHP_SAPI_FPM_SELINUX FALSE )
150+ else ()
151+ option (PHP_SAPI_FPM_SELINUX "Enable the SELinux policy library support" )
152+ endif ()
159153add_feature_info(
160154 "sapi/fpm SELinux"
161155 PHP_SAPI_FPM_SELINUX
162156 "security policy integration"
163157)
164158
165- php_set(
166- PHP_SAPI_FPM_SYSTEMD
167- TYPE BOOL
168- IF [[PHP_SAPI_FPM AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin"]]
169- VALUE OFF
170- DOC "Enable the systemd integration"
171- )
159+ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
160+ set (PHP_SAPI_FPM_SYSTEMD FALSE )
161+ else ()
162+ option (PHP_SAPI_FPM_SYSTEMD "Enable the systemd integration" )
163+ endif ()
172164add_feature_info(
173165 "sapi/fpm systemd"
174166 PHP_SAPI_FPM_SYSTEMD
0 commit comments