Skip to content

Commit eaaf1bf

Browse files
committed
Merge branch 'PHP-8.4'
2 parents bdc5c0c + 9ccee40 commit eaaf1bf

File tree

4 files changed

+42
-12
lines changed

4 files changed

+42
-12
lines changed

cmake/CMakeLists.txt

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,38 @@ project(
1414
VERSION ${PHP_VERSION}
1515
DESCRIPTION "Widely-used general-purpose scripting language"
1616
HOMEPAGE_URL "https://www.php.net"
17-
LANGUAGES C ASM
17+
LANGUAGES C
1818
)
1919

20+
################################################################################
21+
# Configure languages.
22+
################################################################################
23+
24+
# Optionally enable C++ language for PHP extensions.
25+
include(CheckLanguage)
26+
check_language(CXX)
27+
if(CMAKE_CXX_COMPILER)
28+
enable_language(CXX)
29+
endif()
30+
31+
# Enable Assembly language dialect.
32+
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
33+
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^ARM")
34+
enable_language(ASM_MARMASM)
35+
else()
36+
enable_language(ASM_MASM)
37+
endif()
38+
else()
39+
enable_language(ASM)
40+
endif()
41+
2042
set(CMAKE_C_STANDARD 11)
2143
set(CMAKE_C_STANDARD_REQUIRED TRUE)
2244

45+
################################################################################
2346
# Configure project.
47+
################################################################################
48+
2449
include(cmake/Bootstrap.cmake)
2550

2651
add_subdirectory(sapi)

cmake/Zend/CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,20 @@ project(
4242
Zend
4343
VERSION ${Zend_VERSION}
4444
DESCRIPTION "Zend Engine library"
45-
LANGUAGES C ASM
45+
LANGUAGES C
4646
)
4747

48+
# Enable Assembly language dialect.
49+
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
50+
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^ARM")
51+
enable_language(ASM_MARMASM)
52+
else()
53+
enable_language(ASM_MASM)
54+
endif()
55+
else()
56+
enable_language(ASM)
57+
endif()
58+
4859
include(CheckIncludeFiles)
4960
include(CheckSourceCompiles)
5061
include(CheckSymbolExists)

cmake/cmake/Bootstrap.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ define_property(
1616
BRIEF_DOCS "Whether the PHP SAPI is FastCGI-based"
1717
)
1818

19-
# Optionally enable CXX for extensions.
20-
include(CheckLanguage)
21-
check_language(CXX)
22-
if(CMAKE_CXX_COMPILER)
23-
enable_language(CXX)
24-
endif()
25-
2619
# Check whether IPO/LTO can be enabled.
2720
include(PHP/Optimization)
2821

cmake/win32/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ target_sources(
3535
wsyslog.c
3636
PUBLIC
3737
FILE_SET HEADERS
38+
BASE_DIRS ${PHP_SOURCE_DIR}
3839
FILES
3940
codepage.h
4041
console.h
@@ -58,7 +59,7 @@ target_sources(
5859
PUBLIC
5960
FILE_SET generated
6061
TYPE HEADERS
61-
BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR}
62+
BASE_DIRS ${PHP_BINARY_DIR}
6263
FILES
6364
${CMAKE_CURRENT_BINARY_DIR}/wsyslog.h
6465
)
@@ -188,7 +189,7 @@ install(
188189
TARGETS php_windows
189190
ARCHIVE EXCLUDE_FROM_ALL
190191
FILE_SET HEADERS
191-
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PHP_INCLUDE_PREFIX}/win32
192+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PHP_INCLUDE_PREFIX}
192193
FILE_SET generated
193-
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PHP_INCLUDE_PREFIX}/win32
194+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PHP_INCLUDE_PREFIX}
194195
)

0 commit comments

Comments
 (0)