Ladybird: Clean up install rules for executables

Use a list of executables to make sure that we don't miss any of the
applications used by Ladybird and its friends like WebDriver, and make
sure to install include all executables and their runtime dependencies.
This commit is contained in:
Andrew Kaster 2023-02-02 03:22:20 -07:00 committed by Andrew Kaster
parent 8f70e365f0
commit 0d5d3f12e2
Notes: sideshowbarker 2024-07-17 09:49:33 +09:00

View File

@ -4,7 +4,9 @@ include(GNUInstallDirs)
set(package ladybird)
install(TARGETS ladybird
set(ladybird_applications ladybird SQLServer WebContent WebDriver headless-browser)
install(TARGETS ${ladybird_applications}
EXPORT ladybirdTargets
RUNTIME
COMPONENT ladybird_Runtime
@ -18,31 +20,11 @@ install(TARGETS ladybird
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(TARGETS SQLServer
EXPORT ladybirdTargets
RUNTIME
COMPONENT ladybird_Runtime
DESTINATION ${CMAKE_INSTALL_BINDIR}
BUNDLE
COMPONENT ladybird_Runtime
DESTINATION bundle
)
install(TARGETS WebContent
EXPORT ladybirdTargets
RUNTIME
COMPONENT ladybird_Runtime
DESTINATION ${CMAKE_INSTALL_BINDIR}
BUNDLE
COMPONENT ladybird_Runtime
DESTINATION bundle
)
include("${SERENITY_SOURCE_DIR}/Meta/Lagom/get_linked_lagom_libraries.cmake")
get_linked_lagom_libraries(ladybird ladybird_lagom_libraries)
get_linked_lagom_libraries(SQLServer sqlserver_lagom_libraries)
get_linked_lagom_libraries(WebContent webcontent_lagom_libraries)
list(APPEND all_required_lagom_libraries ${ladybird_lagom_libraries} ${sqlserver_lagom_libraries} ${webcontent_lagom_libraries})
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}