mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 13:11:46 +03: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
Notes:
sideshowbarker
2024-07-16 22:14:49 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/46b86ffcfc Pull-request: https://github.com/SerenityOS/serenity/pull/20566
@ -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…
Reference in New Issue
Block a user