summaryrefslogtreecommitdiff
path: root/indra/cmake/CEFPlugin.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/CEFPlugin.cmake')
-rw-r--r--indra/cmake/CEFPlugin.cmake127
1 files changed, 92 insertions, 35 deletions
diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake
index 119a41f570..31ed86213a 100644
--- a/indra/cmake/CEFPlugin.cmake
+++ b/indra/cmake/CEFPlugin.cmake
@@ -5,45 +5,63 @@ include(Prebuilt)
include_guard()
add_library( ll::cef INTERFACE IMPORTED )
-if (CMAKE_OSX_ARCHITECTURES MATCHES arm64)
+if (CMAKE_SYSTEM_PROCESSOR MATCHES aarch64)
if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0)
- if (NOT EXISTS ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2)
+ if (NOT EXISTS ${CMAKE_BINARY_DIR}/v1.14.0-r3.tar.gz)
file(DOWNLOAD
- https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2
- ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2
- SHOW_PROGRESS
+ https://github.com/secondlife/dullahan/archive/refs/tags/v1.14.0-r3.tar.gz
+ ${CMAKE_BINARY_DIR}/v1.14.0-r3.tar.gz
)
- endif (NOT EXISTS ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2)
+ endif ()
file(ARCHIVE_EXTRACT
- INPUT ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2
- DESTINATION ${LIBS_PREBUILT_DIR}
+ INPUT ${CMAKE_BINARY_DIR}/v1.14.0-r3.tar.gz
+ DESTINATION ${CMAKE_BINARY_DIR}
)
- file(WRITE ${PREBUILD_TRACKING_DIR}/dullahan_installed "0")
- endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0)
-elseif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
- if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0)
- if (NOT EXISTS ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2)
- file(DOWNLOAD
- https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2
- ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2
- SHOW_PROGRESS
- )
- endif (NOT EXISTS ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2)
- file(ARCHIVE_EXTRACT
- INPUT ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2
- DESTINATION ${LIBS_PREBUILT_DIR}
+ execute_process(
+ COMMAND sed -i "/#include <vector>/a #include <cstdint>" dullahan.h
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/dullahan-1.14.0-r3/src
+ )
+ file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/cef)
+ try_compile(DULLAHAN_RESULT
+ PROJECT dullahan
+ SOURCE_DIR ${CMAKE_BINARY_DIR}/dullahan-1.14.0-r3
+ BINARY_DIR ${CMAKE_BINARY_DIR}/dullahan-1.14.0-r3
+ CMAKE_FLAGS
+ -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+ -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
+ -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
+ -DCMAKE_INSTALL_PREFIX:PATH=${LIBS_PREBUILT_DIR}
+ -DCMAKE_INSTALL_LIBDIR:PATH=${ARCH_PREBUILT_DIRS_RELEASE}
+ -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON
+ -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DUSE_SPOTIFY_CEF:BOOL=ON
+ -DSPOTIFY_CEF_URL:STRING=https://cef-builds.spotifycdn.com/cef_binary_118.4.1%2Bg3dd6078%2Bchromium-118.0.5993.54_linuxarm64_beta_minimal.tar.bz2
+ -DPROJECT_ARCH:STRING=${CMAKE_SYSTEM_PROCESSOR}
+ -DENABLE_CXX11_ABI:BOOL=ON
+ )
+ if (${DULLAHAN_RESULT})
+ execute_process(
+ COMMAND ${CMAKE_MAKE_PROGRAM} install
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/dullahan-1.14.0-r3
+ OUTPUT_VARIABLE dullahan_installed
)
- file(WRITE ${PREBUILD_TRACKING_DIR}/dullahan_installed "0")
+ file(
+ COPY
+ ${CMAKE_BINARY_DIR}/dullahan-1.14.0-r3/src/dullahan.h
+ ${CMAKE_BINARY_DIR}/dullahan-1.14.0-r3/src/dullahan_version.h
+ DESTINATION ${LIBS_PREBUILT_DIR}/include/cef
+ )
+ file(WRITE ${PREBUILD_TRACKING_DIR}/dullahan_installed "${dullahan_installed}")
+ endif (${DULLAHAN_RESULT})
endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0)
-else (CMAKE_OSX_ARCHITECTURES MATCHES arm64)
+else ()
use_prebuilt_binary(dullahan)
- if (${LINUX_DISTRO} MATCHES fedora)
- execute_process(
- COMMAND patchelf --remove-rpath bin/release/dullahan_host
- WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}
- )
- endif (${LINUX_DISTRO} MATCHES fedora)
-endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64)
+endif ()
+
+execute_process(
+ COMMAND patchelf --remove-rpath bin/release/dullahan_host
+ WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}
+ )
target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef)
@@ -68,13 +86,52 @@ elseif (DARWIN)
${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a
${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a
${APPKIT_LIBRARY}
- "-F ${CEF_LIBRARY}"
)
+ execute_process(
+ COMMAND lipo Chromium\ Embedded\ Framework.framework/Chromium\ Embedded\ Framework
+ -thin ${CMAKE_OSX_ARCHITECTURES}
+ -output Chromium\ Embedded\ Framework.framework/Chromium\ Embedded\ Framework
+ COMMAND lipo Chromium\ Embedded\ Framework.framework/Libraries/libEGL.dylib
+ -thin ${CMAKE_OSX_ARCHITECTURES}
+ -output Chromium\ Embedded\ Framework.framework/Libraries/libEGL.dylib
+ COMMAND lipo Chromium\ Embedded\ Framework.framework/Libraries/libGLESv2.dylib
+ -thin ${CMAKE_OSX_ARCHITECTURES}
+ -output Chromium\ Embedded\ Framework.framework/Libraries/libGLESv2.dylib
+ COMMAND lipo Chromium\ Embedded\ Framework.framework/Libraries/libcef_sandbox.dylib
+ -thin ${CMAKE_OSX_ARCHITECTURES}
+ -output Chromium\ Embedded\ Framework.framework/Libraries/libcef_sandbox.dylib
+ COMMAND lipo Chromium\ Embedded\ Framework.framework/Libraries/libvk_swiftshader.dylib
+ -thin ${CMAKE_OSX_ARCHITECTURES}
+ -output Chromium\ Embedded\ Framework.framework/Libraries/libvk_swiftshader.dylib
+ COMMAND lipo DullahanHelper\ \(Alerts\).app/Contents/MacOS/DullahanHelper\ \(Alerts\)
+ -thin ${CMAKE_OSX_ARCHITECTURES}
+ -output DullahanHelper\ \(Alerts\).app/Contents/MacOS/DullahanHelper\ \(Alerts\)
+ COMMAND lipo DullahanHelper\ \(GPU\).app/Contents/MacOS/DullahanHelper\ \(GPU\)
+ -thin ${CMAKE_OSX_ARCHITECTURES}
+ -output DullahanHelper\ \(GPU\).app/Contents/MacOS/DullahanHelper\ \(GPU\)
+ COMMAND lipo DullahanHelper\ \(Plugin\).app/Contents/MacOS/DullahanHelper\ \(Plugin\)
+ -thin ${CMAKE_OSX_ARCHITECTURES}
+ -output DullahanHelper\ \(Plugin\).app/Contents/MacOS/DullahanHelper\ \(Plugin\)
+ COMMAND lipo DullahanHelper\ \(Renderer\).app/Contents/MacOS/DullahanHelper\ \(Renderer\)
+ -thin ${CMAKE_OSX_ARCHITECTURES}
+ -output DullahanHelper\ \(Renderer\).app/Contents/MacOS/DullahanHelper\ \(Renderer\)
+ COMMAND lipo DullahanHelper.app/Contents/MacOS/DullahanHelper
+ -thin ${CMAKE_OSX_ARCHITECTURES}
+ -output DullahanHelper.app/Contents/MacOS/DullahanHelper
+ COMMAND lipo libcef_dll_wrapper.a
+ -thin ${CMAKE_OSX_ARCHITECTURES}
+ -output libcef_dll_wrapper.a
+ COMMAND lipo libdullahan.a
+ -thin ${CMAKE_OSX_ARCHITECTURES}
+ -output libdullahan.a
+ WORKING_DIRECTORY ${ARCH_PREBUILT_DIRS_RELEASE}
+ )
+
elseif (LINUX)
target_link_libraries( ll::cef INTERFACE
- libdullahan.a
- cef
- cef_dll_wrapper.a
+ libdullahan.a
+ cef
+ cef_dll_wrapper.a
)
endif (WINDOWS)