mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:17:45 +00:00
Ladybird/CMake: Install resources and Lagom libraries alongside ladybird
This setup should allow the package maintainers who are looking to distribute ladybird on their distributions to use CMake to install ladybird using cmake install rules rather than having to write their own
This commit is contained in:
parent
3403b1fd77
commit
488da351c0
3 changed files with 82 additions and 6 deletions
75
Ladybird/cmake/InstallRules.cmake
Normal file
75
Ladybird/cmake/InstallRules.cmake
Normal file
|
@ -0,0 +1,75 @@
|
|||
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(package ladybird)
|
||||
|
||||
install(TARGETS ladybird
|
||||
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("${Lagom_SOURCE_DIR}/get_linked_lagom_libraries.cmake")
|
||||
get_linked_lagom_libraries(ladybird ladybird_lagom_libraries)
|
||||
|
||||
install(TARGETS ${ladybird_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
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue