Skip to content

Commit e780575

Browse files
committed
Update CMakeLists.txt
1 parent 3d750e7 commit e780575

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Source/JavaScriptCore/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1631,11 +1631,18 @@ WEBKIT_COPY_FILES(JavaScriptCore_CopyPrivateHeaders
16311631
)
16321632
add_dependencies(JavaScriptCore_CopyPrivateHeaders Bytecodes JSCBuiltins)
16331633

1634+
# For static JSC builds, ensure headers are always copied as part of the default build
1635+
if (ENABLE_STATIC_JSC)
1636+
add_dependencies(JavaScriptCore JavaScriptCore_CopyHeaders JavaScriptCore_CopyPrivateHeaders)
1637+
endif ()
1638+
16341639
# JavaScriptCore_CopyPrivateHeaders needs to have a direct or indirect
16351640
# dependency of JavaScriptCore for CMake Visual Studio generator to
16361641
# eliminate duplicated custom commands. Otherwise,
16371642
# CombinedDomains.json will be generated in both projects.
1638-
if(NOT INTERNAL_BUILD)
1643+
# However, for static JSC builds, we cannot have this dependency as it creates
1644+
# a cycle - instead, we ensure headers are copied by adding them to the default target.
1645+
if(NOT INTERNAL_BUILD AND NOT ENABLE_STATIC_JSC)
16391646
add_dependencies(JavaScriptCore_CopyPrivateHeaders JavaScriptCore)
16401647
endif()
16411648

0 commit comments

Comments
 (0)