mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:27:35 +00:00
Ladybird: Add install rules to make app bundle on macOS relocatable
We were still missing the resources and the libraries inside the actual bundle directory. Do it at install time to not make a mess of all the rules. The gn build lists all the libraries in a massive list, which is quite a pain. We can over-copy a few libraries like this to make the install script a bit easier to follow.
This commit is contained in:
parent
ea0e07ec8f
commit
46b86ffcfc
1 changed files with 21 additions and 0 deletions
|
@ -106,3 +106,24 @@ install(FILES
|
|||
DESTINATION "${CMAKE_INSTALL_DATADIR}/res/ladybird"
|
||||
COMPONENT ladybird_Runtime
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
# Fixup the app bundle and copy:
|
||||
# - Libraries from lib/ to ladybird.app/Contents/lib
|
||||
# - Resources from share/res/ to ladybird.app/Contents/Resources/res
|
||||
install(CODE "
|
||||
set(res_dir \${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/res)
|
||||
if (IS_ABSOLUTE ${CMAKE_INSTALL_DATADIR})
|
||||
set(res_dir ${CMAKE_INSTALL_DATADIR}/res)
|
||||
endif()
|
||||
set(lib_dir \${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
|
||||
if (IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
|
||||
set(lib_dir ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
||||
set(contents_dir \${CMAKE_INSTALL_PREFIX}/bundle/ladybird.app/Contents)
|
||||
file(COPY \${res_dir} DESTINATION \${contents_dir}/Resources)
|
||||
file(COPY \${lib_dir} DESTINATION \${contents_dir})
|
||||
"
|
||||
COMPONENT ladybird_Runtime)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue