Skip to content

Commit d38a365

Browse files
EnactorEnactor
authored andcommitted
added maven-antrun-plugin plugin into the pom.xml and added a change to copy libcef_sandbox.dylib into a custom location
1 parent 5924367 commit d38a365

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

native/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,15 @@ if(OS_MAC)
348348
COMMAND ${CMAKE_COMMAND} -E copy_directory
349349
"${CEF_BINARY_DIR}/Chromium Embedded Framework.framework"
350350
"${JCEF_APP}/Contents/Frameworks/Chromium Embedded Framework.framework"
351+
# CRITICAL: Helper apps look for libcef_sandbox.dylib at:
352+
# "../../../Chromium Embedded Framework.framework/Libraries/libcef_sandbox.dylib"
353+
# Create the directory structure and copy ONLY the sandbox library (not entire framework).
354+
# This saves ~500MB by avoiding duplication of the entire framework.
355+
COMMAND ${CMAKE_COMMAND} -E make_directory
356+
"${CEF_TARGET_OUT_DIR}/Chromium Embedded Framework.framework/Libraries"
357+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
358+
"${CEF_BINARY_DIR}/Chromium Embedded Framework.framework/Libraries/libcef_sandbox.dylib"
359+
"${CEF_TARGET_OUT_DIR}/Chromium Embedded Framework.framework/Libraries/libcef_sandbox.dylib"
351360
# Copy the JCEF library into the main app bindle.
352361
COMMAND ${CMAKE_COMMAND} -E copy_if_different
353362
"${CEF_TARGET_OUT_DIR}/${JCEF_TARGET_LIBRARY}"
@@ -435,7 +444,6 @@ if(OS_WINDOWS)
435444
add_dependencies(${JCEF_TARGET} libcef_dll_wrapper ${JCEF_HELPER_TARGET})
436445
target_link_libraries(${JCEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS} ${JNI_LIBRARIES})
437446
target_include_directories(${JCEF_TARGET} PUBLIC ${JNI_INCLUDE_DIRS})
438-
target_compile_options(${JCEF_TARGET} PRIVATE "-Wno-error")
439447

440448
# Compile flags specific to the JCEF library target.
441449
# USING_JAVA = Add the USING_JAVA define.

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@
7777
<artifactId>git-commit-id-plugin</artifactId>
7878
<version>2.2.6</version>
7979
</plugin>
80+
<plugin>
81+
<groupId>org.apache.maven.plugins</groupId>
82+
<artifactId>maven-antrun-plugin</artifactId>
83+
<version>1.8</version>
84+
</plugin>
8085
</plugins>
8186
</pluginManagement>
8287
</build>

0 commit comments

Comments
 (0)