@@ -34,11 +34,54 @@ https://bugs.php.net/53141
3434TODO: Improve this or simplify the sorting complexities in its entierity. PHP 
3535dependencies are handled very basically ATM. 
3636
37- Exposed macro:  
37+ ##  Exposed macro
3838
3939```cmake 
4040php_extensions_add(subdirectory) 
4141``` 
42+ 
43+ ## Custom CMake properties 
44+ 
45+ * `PHP_ALL_EXTENSIONS` 
46+ 
47+   Global property with a list of all PHP extensions in the ext directory. 
48+ 
49+ * `PHP_ALWAYS_ENABLED_EXTENSIONS` 
50+ 
51+   This global property contains a list of always enabled PHP extensions which 
52+   don't need the `HAVE_<extension-name>` preprocessor macros defined in the PHP 
53+   configuration header and can be considered as part of the core PHP engine. 
54+ 
55+ * `PHP_EXTENSIONS` 
56+ 
57+   This global property contains a list of all enabled PHP extensions for the 
58+   current configuration. Extensions are sorted by the directory priority (see 
59+   `PHP_PRIORITY` property) and extension dependencies (added with CMake command 
60+   `add_dependencies()`). 
61+ 
62+ * `PHP_PRIORITY` 
63+ 
64+   This optional directory property controls the order of the PHP extensions 
65+   added with the `add_subdirectory()`. Directory added with `add_subdirectory()` 
66+   won't be visible in the configuration phase for the directories added before. 
67+   Priority number can be used to add the extension subdirectory prior (0..100) 
68+   or later (\>100) to other extensions. By default extensions are sorted 
69+   alphabetically and added in between. This enables having extension variables 
70+   visible in depending extensions. 
71+ 
72+ * `PHP_ZEND_EXTENSION` 
73+ 
74+   Extensions can utilize this custom target property, which designates the 
75+   extension as a Zend extension rather than a standard PHP extension. Zend 
76+   extensions function similarly to regular PHP extensions, but they are loaded 
77+   using the `zend_extension` INI directive and possess an internally distinct 
78+   structure with additional hooks. Typically employed for advanced 
79+   functionalities like debuggers and profilers, Zend extensions offer enhanced 
80+   capabilities. 
81+ 
82+   ```cmake 
83+   set_target_properties(php_<extension_name> PROPERTIES PHP_ZEND_EXTENSION TRUE) 
84+   ``` 
4285#]=============================================================================] 
4386
4487include_guard (GLOBAL )
@@ -47,42 +90,16 @@ include_guard(GLOBAL)
4790# CMake custom properties. 
4891################################################################################ 
4992
50- define_property (
51-   DIRECTORY 
52-   PROPERTY PHP_PRIORITY
53-   BRIEF_DOCS "Controls when to add subdirectory in the configuration phase" 
54-   FULL_DOCS "This optional property controls the order of the extensions added " 
55-             "with add_subdirectory(). Directory added with add_subdirectory() " 
56-             "won't be visible in the configuration phase for the directories " 
57-             "added before. Priority number can be used to add the extension " 
58-             "subdirectory prior (0..100) or later (>100) to other extensions. " 
59-             "By default extensions are sorted alphabetically and added in " 
60-             "between. This enables having extension variables visible in " 
61-             "depending extensions." 
62- )
63- 
64- define_property (
65-   TARGET 
66-   PROPERTY PHP_ZEND_EXTENSION
67-   BRIEF_DOCS "Whether the extension target is Zend extension" 
68- )
69- 
7093define_property (
7194  GLOBAL 
72-   PROPERTY PHP_EXTENSIONS
73-   BRIEF_DOCS "A list of all enabled extensions" 
74-   FULL_DOCS "This property contains a list of all enabled extensions for the " 
75-             "current configuration. Extensions are sorted by the directory " 
76-             "priority and their dependencies." 
95+   PROPERTY PHP_ALL_EXTENSIONS
96+   BRIEF_DOCS "A list of all extensions in the ext directory" 
7797)
7898
7999define_property (
80100  GLOBAL 
81101  PROPERTY PHP_ALWAYS_ENABLED_EXTENSIONS
82102  BRIEF_DOCS "A list of always enabled PHP extensions" 
83-   FULL_DOCS "This property contains a list of always enabled PHP extensions " 
84-             "which don't need HAVE_<extension-name> symbols and can be " 
85-             "considered as part of the core PHP engine." 
86103)
87104
88105set_property (GLOBAL  PROPERTY PHP_ALWAYS_ENABLED_EXTENSIONS
@@ -98,8 +115,20 @@ set_property(GLOBAL PROPERTY PHP_ALWAYS_ENABLED_EXTENSIONS
98115
99116define_property (
100117  GLOBAL 
101-   PROPERTY PHP_ALL_EXTENSIONS
102-   BRIEF_DOCS "A list of all extensions in the ext directory" 
118+   PROPERTY PHP_EXTENSIONS
119+   BRIEF_DOCS "A list of all enabled extensions" 
120+ )
121+ 
122+ define_property (
123+   DIRECTORY 
124+   PROPERTY PHP_PRIORITY
125+   BRIEF_DOCS "Controls when to add subdirectory in the configuration phase" 
126+ )
127+ 
128+ define_property (
129+   TARGET 
130+   PROPERTY PHP_ZEND_EXTENSION
131+   BRIEF_DOCS "Whether the extension target is Zend extension" 
103132)
104133
105134################################################################################ 
0 commit comments