mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 19:38:12 +00:00

We don't need the extra gradle files in our sources, the Qt CMake integration will generate suitable ones for us. Make sure that assets is always a folder, so that we can get the proper layout for the ladybird-assets.tar.gz and CMake doesn't create a gzip file with the name "assets". Fix up the AndroidPlatform file and make sure it's linked into all the applications that need it. Also make sure to copy all the application shared libraries into the ladybird APK so that when we make them into proper Services, the libs are already there.
94 lines
2.8 KiB
CMake
94 lines
2.8 KiB
CMake
|
|
include(CMakePackageConfigHelpers)
|
|
include(GNUInstallDirs)
|
|
|
|
set(package ladybird)
|
|
|
|
set(ladybird_applications ladybird SQLServer WebContent WebDriver headless-browser)
|
|
|
|
set(app_install_targets ${ladybird_applications})
|
|
if (ANDROID)
|
|
# androiddeployqt will get confused with duplicate resources if we install every app
|
|
set(app_install_targets ladybird)
|
|
endif()
|
|
|
|
install(TARGETS ${app_install_targets}
|
|
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}
|
|
)
|
|
|
|
include("${SERENITY_SOURCE_DIR}/Meta/Lagom/get_linked_lagom_libraries.cmake")
|
|
foreach (application IN LISTS ladybird_applications)
|
|
get_linked_lagom_libraries("${application}" "${application}_lagom_libraries")
|
|
list(APPEND all_required_lagom_libraries "${${application}_lagom_libraries}")
|
|
endforeach()
|
|
list(REMOVE_DUPLICATES all_required_lagom_libraries)
|
|
|
|
install(TARGETS ${all_required_lagom_libraries}
|
|
EXPORT ladybirdTargets
|
|
COMPONENT ladybird_Runtime
|
|
LIBRARY
|
|
COMPONENT ladybird_Runtime
|
|
NAMELINK_COMPONENT ladybird_Development
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
)
|
|
|
|
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/html"
|
|
"${SERENITY_SOURCE_DIR}/Base/res/fonts"
|
|
"${SERENITY_SOURCE_DIR}/Base/res/icons"
|
|
"${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
|
|
)
|
|
|
|
install(FILES
|
|
"${SERENITY_SOURCE_DIR}/Base/home/anon/.config/BrowserAutoplayAllowlist.txt"
|
|
"${SERENITY_SOURCE_DIR}/Base/home/anon/.config/BrowserContentFilters.txt"
|
|
DESTINATION "${CMAKE_INSTALL_DATADIR}/res/ladybird"
|
|
COMPONENT ladybird_Runtime
|
|
)
|