Skip to content

Commit c083f4f

Browse files
committed
Automatically copy CEF Resources and binaries from CEF Release folder
after build
1 parent 3cdf733 commit c083f4f

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

CMakeLists.txt

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,35 @@ if (APPLE)
328328
COMMAND rm -rf "$<TARGET_FILE_DIR:cef-isolation>/../Frameworks/CEF Helper.app"
329329
COMMAND cp -Rf "$<TARGET_FILE_DIR:cef-bootstrap>/../../../CEF Helper.app" "$<TARGET_FILE_DIR:cef-isolation>/../Frameworks"
330330
)
331-
331+
332+
else(APPLE)
333+
math(EXPR BITS "8*${CMAKE_SIZEOF_VOID_P}")
334+
add_custom_command(TARGET obs-browser POST_BUILD
335+
COMMAND ${CMAKE_COMMAND} -E copy_directory
336+
"${CEF_ROOT_DIR}/Resources"
337+
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/obs-plugins/${BITS}bit/"
338+
)
339+
340+
add_custom_command(TARGET obs-browser POST_BUILD
341+
COMMAND ${CMAKE_COMMAND} -E copy
342+
"${CEF_ROOT_DIR}/Release/chrome_elf.dll"
343+
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/obs-plugins/${BITS}bit/"
344+
COMMAND ${CMAKE_COMMAND} -E copy
345+
"${CEF_ROOT_DIR}/Release/libcef.dll"
346+
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/obs-plugins/${BITS}bit/"
347+
COMMAND ${CMAKE_COMMAND} -E copy
348+
"${CEF_ROOT_DIR}/Release/libEGL.dll"
349+
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/obs-plugins/${BITS}bit/"
350+
COMMAND ${CMAKE_COMMAND} -E copy
351+
"${CEF_ROOT_DIR}/Release/libGLESv2.dll"
352+
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/obs-plugins/${BITS}bit/"
353+
COMMAND ${CMAKE_COMMAND} -E copy
354+
"${CEF_ROOT_DIR}/Release/natives_blob.bin"
355+
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/obs-plugins/${BITS}bit/"
356+
COMMAND ${CMAKE_COMMAND} -E copy
357+
"${CEF_ROOT_DIR}/Release/snapshot_blob.bin"
358+
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/obs-plugins/${BITS}bit/"
359+
)
332360
endif(APPLE)
333361

334362
if(APPLE)

0 commit comments

Comments
 (0)