mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:47:45 +00:00
Ladybird: Support building Ladybird as a non-top-level project
The implementation assumes that Lagom is either the top level project, or included before Ladybird is.
This commit is contained in:
parent
03294b0177
commit
b4d80f92ec
4 changed files with 40 additions and 46 deletions
18
Ladybird/cmake/EnableLagom.cmake
Normal file
18
Ladybird/cmake/EnableLagom.cmake
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Copyright (c) 2021, Andrew Kaster <akaster@serenityos.org>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
set(BUILD_LAGOM ON CACHE INTERNAL "Build all Lagom targets")
|
||||
|
||||
set(LAGOM_SOURCE_DIR "${SERENITY_SOURCE_DIR}/Meta/Lagom")
|
||||
set(LAGOM_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/Lagom")
|
||||
|
||||
# FIXME: Setting target_include_directories on Lagom libraries might make this unecessary?
|
||||
include_directories(${SERENITY_SOURCE_DIR})
|
||||
include_directories(${SERENITY_SOURCE_DIR}/Userland/Libraries)
|
||||
include_directories(${LAGOM_BINARY_DIR})
|
||||
include_directories(${LAGOM_BINARY_DIR}/Userland/Services)
|
||||
include_directories(${LAGOM_BINARY_DIR}/Userland/Libraries)
|
||||
|
||||
# We set EXCLUDE_FROM_ALL to make sure that only required Lagom libraries are built
|
||||
add_subdirectory("${LAGOM_SOURCE_DIR}" "${LAGOM_BINARY_DIR}" EXCLUDE_FROM_ALL)
|
Loading…
Add table
Add a link
Reference in a new issue