2022-09-16 10:08:24 +00:00
|
|
|
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
|
|
|
set(package ladybird)
|
|
|
|
|
2024-02-21 23:16:15 +00:00
|
|
|
set(ladybird_applications ladybird ${ladybird_helper_processes})
|
2023-02-02 10:22:20 +00:00
|
|
|
|
2023-07-19 16:27:16 +00:00
|
|
|
set(app_install_targets ${ladybird_applications})
|
|
|
|
|
|
|
|
install(TARGETS ${app_install_targets}
|
2022-09-16 10:08:24 +00:00
|
|
|
EXPORT ladybirdTargets
|
|
|
|
RUNTIME
|
|
|
|
COMPONENT ladybird_Runtime
|
|
|
|
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
BUNDLE
|
|
|
|
COMPONENT ladybird_Runtime
|
|
|
|
DESTINATION bundle
|
|
|
|
LIBRARY
|
|
|
|
COMPONENT ladybird_Runtime
|
|
|
|
NAMELINK_COMPONENT ladybird_Development
|
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
2023-08-08 04:14:22 +00:00
|
|
|
FILE_SET browser
|
|
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
|
|
FILE_SET ladybird
|
|
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
2022-09-16 10:08:24 +00:00
|
|
|
)
|
|
|
|
|
2022-12-23 18:36:02 +00:00
|
|
|
include("${SERENITY_SOURCE_DIR}/Meta/Lagom/get_linked_lagom_libraries.cmake")
|
2023-02-02 10:22:20 +00:00
|
|
|
foreach (application IN LISTS ladybird_applications)
|
|
|
|
get_linked_lagom_libraries("${application}" "${application}_lagom_libraries")
|
|
|
|
list(APPEND all_required_lagom_libraries "${${application}_lagom_libraries}")
|
|
|
|
endforeach()
|
2022-10-07 23:08:29 +00:00
|
|
|
list(REMOVE_DUPLICATES all_required_lagom_libraries)
|
2022-09-16 10:08:24 +00:00
|
|
|
|
2023-09-02 15:30:21 +00:00
|
|
|
# Remove ladybird shlib if it exists
|
|
|
|
list(REMOVE_ITEM all_required_lagom_libraries ladybird)
|
|
|
|
|
2023-09-16 00:01:23 +00:00
|
|
|
# Install service impl libraries if they exist
|
|
|
|
macro(install_service_lib service)
|
|
|
|
if (TARGET ${service})
|
|
|
|
get_target_property(target_type ${service} TYPE)
|
|
|
|
if ("${target_type}" STREQUAL STATIC_LIBRARY)
|
|
|
|
list(APPEND all_required_lagom_libraries ${service})
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endmacro()
|
2023-11-08 18:47:41 +00:00
|
|
|
foreach(service IN LISTS webcontent requestserver websocket webworker)
|
2023-09-16 00:01:23 +00:00
|
|
|
install_service_lib(${service})
|
|
|
|
endforeach()
|
2023-08-12 00:26:17 +00:00
|
|
|
|
2022-10-07 23:08:29 +00:00
|
|
|
install(TARGETS ${all_required_lagom_libraries}
|
2022-09-16 10:08:24 +00:00
|
|
|
EXPORT ladybirdTargets
|
|
|
|
COMPONENT ladybird_Runtime
|
|
|
|
LIBRARY
|
|
|
|
COMPONENT ladybird_Runtime
|
|
|
|
NAMELINK_COMPONENT ladybird_Development
|
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
2023-08-12 01:38:31 +00:00
|
|
|
FILE_SET server
|
|
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
|
|
FILE_SET ladybird
|
|
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
2022-09-16 10:08:24 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
write_basic_package_version_file(
|
|
|
|
"${package}ConfigVersion.cmake"
|
|
|
|
COMPATIBILITY SameMajorVersion
|
|
|
|
)
|
|
|
|
|
|
|
|
# Allow package maintainers to freely override the path for the configs
|
|
|
|
set(
|
|
|
|
ladybird_INSTALL_CMAKEDIR "${CMAKE_INSTALL_DATADIR}/${package}"
|
|
|
|
CACHE PATH "CMake package config location relative to the install prefix"
|
|
|
|
)
|
|
|
|
mark_as_advanced(ladybird_INSTALL_CMAKEDIR)
|
|
|
|
|
|
|
|
install(
|
|
|
|
FILES cmake/LadybirdInstallConfig.cmake
|
|
|
|
DESTINATION "${ladybird_INSTALL_CMAKEDIR}"
|
|
|
|
RENAME "${package}Config.cmake"
|
|
|
|
COMPONENT ladybird_Development
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
FILES "${PROJECT_BINARY_DIR}/${package}ConfigVersion.cmake"
|
|
|
|
DESTINATION "${ladybird_INSTALL_CMAKEDIR}"
|
|
|
|
COMPONENT ladybird_Development
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
EXPORT ladybirdTargets
|
|
|
|
NAMESPACE ladybird::
|
|
|
|
DESTINATION "${ladybird_INSTALL_CMAKEDIR}"
|
|
|
|
COMPONENT ladybird_Development
|
|
|
|
)
|
|
|
|
|
|
|
|
install(DIRECTORY
|
|
|
|
"${SERENITY_SOURCE_DIR}/Base/res/fonts"
|
|
|
|
"${SERENITY_SOURCE_DIR}/Base/res/icons"
|
2023-12-08 22:30:41 +00:00
|
|
|
"${SERENITY_SOURCE_DIR}/Base/res/ladybird"
|
2022-09-16 10:08:24 +00:00
|
|
|
"${SERENITY_SOURCE_DIR}/Base/res/themes"
|
|
|
|
"${SERENITY_SOURCE_DIR}/Base/res/color-palettes"
|
|
|
|
"${SERENITY_SOURCE_DIR}/Base/res/cursor-themes"
|
|
|
|
DESTINATION "${CMAKE_INSTALL_DATADIR}/res"
|
|
|
|
USE_SOURCE_PERMISSIONS MESSAGE_NEVER
|
|
|
|
COMPONENT ladybird_Runtime
|
|
|
|
)
|
2022-10-04 00:28:31 +00:00
|
|
|
|
|
|
|
install(FILES
|
2023-04-17 17:55:42 +00:00
|
|
|
"${SERENITY_SOURCE_DIR}/Base/home/anon/.config/BrowserAutoplayAllowlist.txt"
|
2022-10-04 00:28:31 +00:00
|
|
|
"${SERENITY_SOURCE_DIR}/Base/home/anon/.config/BrowserContentFilters.txt"
|
2023-08-01 20:39:19 +00:00
|
|
|
"${Lagom_BINARY_DIR}/cacert.pem"
|
2022-10-04 00:28:31 +00:00
|
|
|
DESTINATION "${CMAKE_INSTALL_DATADIR}/res/ladybird"
|
|
|
|
COMPONENT ladybird_Runtime
|
|
|
|
)
|
2023-08-14 04:23:46 +00:00
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
# Fixup the app bundle and copy:
|
2023-09-03 14:16:49 +00:00
|
|
|
# - Libraries from lib/ to Ladybird.app/Contents/lib
|
|
|
|
# - Resources from share/res/ to Ladybird.app/Contents/Resources/res
|
2023-08-14 04:23:46 +00:00
|
|
|
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()
|
|
|
|
|
2023-09-03 14:16:49 +00:00
|
|
|
set(contents_dir \${CMAKE_INSTALL_PREFIX}/bundle/Ladybird.app/Contents)
|
2023-08-14 04:23:46 +00:00
|
|
|
file(COPY \${res_dir} DESTINATION \${contents_dir}/Resources)
|
|
|
|
file(COPY \${lib_dir} DESTINATION \${contents_dir})
|
|
|
|
"
|
|
|
|
COMPONENT ladybird_Runtime)
|
|
|
|
endif()
|