mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Meta: Copy resources to the app bundle during create_ladybird_bundle()
For some reason, moving the UI-specific CMake to its own files prevents resource files from being copied to the Resource directory in the macOS application. I'm not sure what the difference here is, but doing this step during create_ladybird_bundle() works.
This commit is contained in:
parent
c79041344d
commit
8641e78cdc
Notes:
sideshowbarker
2024-07-17 10:39:39 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/8641e78cdc Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/62 Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 9 additions and 7 deletions
|
@ -1,3 +1,4 @@
|
|||
include(cmake/ResourceFiles.cmake)
|
||||
|
||||
set(LADYBIRD_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/HelperProcess.cpp
|
||||
|
@ -34,6 +35,14 @@ function(create_ladybird_bundle target_name)
|
|||
COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" "${bundle_dir}/Contents/lib"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
set(resource_base_dir "$<TARGET_BUNDLE_DIR:${target_name}>/Contents/Resources")
|
||||
else()
|
||||
set(resource_base_dir "${CMAKE_BINARY_DIR}/${IN_BUILD_PREFIX}${CMAKE_INSTALL_DATADIR}/Lagom")
|
||||
endif()
|
||||
|
||||
copy_resources_to_build(${resource_base_dir} ${target_name})
|
||||
endfunction()
|
||||
|
||||
# Select UI Framework
|
||||
|
@ -121,13 +130,6 @@ if (APPLE)
|
|||
set_helper_process_properties(headless-browser WebDriver)
|
||||
endif()
|
||||
|
||||
include(cmake/ResourceFiles.cmake)
|
||||
set(resource_base_dir "${CMAKE_BINARY_DIR}/${IN_BUILD_PREFIX}${CMAKE_INSTALL_DATADIR}/Lagom")
|
||||
if (APPLE)
|
||||
set(resource_base_dir "$<TARGET_BUNDLE_DIR:ladybird>/Contents/Resources")
|
||||
endif()
|
||||
copy_resources_to_build(${resource_base_dir} ladybird)
|
||||
|
||||
if(NOT CMAKE_SKIP_INSTALL_RULES)
|
||||
include(cmake/InstallRules.cmake)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue