Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e44db2d

Browse files
committed
Merge branch 'PHP-8.5'
2 parents a34bafd + 927726a commit e44db2d

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

‎cmake/ext/date/CMakeLists.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ target_compile_options(
5050
)
5151

5252
# Configure timelib.
53+
set(TIMELIB_NAMESPACE "PHP_EXT_DATE_TIMELIB")
5354
set(TIMELIB_TARGET php_ext_date)
5455
add_subdirectory(lib)
5556

‎cmake/ext/date/lib/CMakeLists.txt‎

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,55 @@
33
44
Simplified CMake-based build system for the timelib library.
55
6-
## Usage
6+
## Configuration variables
7+
8+
* `TIMELIB_NAMESPACE`
9+
10+
Namespace string used as the project name and variables prefix. If not
11+
specified, default value is `TIMELIB`.
12+
13+
* `<TIMELIB_NAMESPACE>_VERSION`.
14+
15+
* `TIMELIB_TARGET`
16+
17+
If specified, this target will be used to add timelib source files to it and
18+
compile properties. If not specified, a library target named `timelib` will be
19+
created.
20+
21+
## Examples
722
823
Adding timelib with `add_subdirectory()`:
924
1025
```cmake
26+
set(TIMELIB_NAMESPACE "PHP_EXT_DATE_TIMELIB")
1127
set(TIMELIB_TARGET php_ext_date)
1228
add_subdirectory(lib)
1329
```
1430
#]=============================================================================]
1531

1632
cmake_minimum_required(VERSION 4.2...4.3)
1733

34+
if(NOT TIMELIB_NAMESPACE)
35+
set(TIMELIB_NAMESPACE "TIMELIB")
36+
endif()
37+
1838
# The timelib version.
19-
block(PROPAGATE timelib_VERSION)
39+
block(PROPAGATE ${TIMELIB_NAMESPACE}_VERSION)
2040
file(
2141
STRINGS
2242
timelib.h
2343
_
2444
REGEX "^[ \t]*#[ \t]*define[ \t]+TIMELIB_ASCII_VERSION[ \t]+\"([0-9.]+[^\"]*)"
2545
)
2646

27-
set(timelib_VERSION "${CMAKE_MATCH_1}")
47+
set(${TIMELIB_NAMESPACE}_VERSION "${CMAKE_MATCH_1}")
2848

29-
message(STATUS "Configuring timelib ${timelib_VERSION}")
49+
message(STATUS "Configuring timelib ${${TIMELIB_NAMESPACE}_VERSION}")
3050
endblock()
3151

3252
project(
33-
timelib
34-
VERSION ${timelib_VERSION}
53+
${TIMELIB_NAMESPACE}
54+
VERSION ${${TIMELIB_NAMESPACE}_VERSION}
3555
#SPDX_LICENSE "MIT"
3656
DESCRIPTION "Timezone and date/time library"
3757
HOMEPAGE_URL "https://github.com/derickr/timelib"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /