1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

CMake+Userland: Use CMakeLists from Userland to build Lagom Libraries

Also do this for Shell.

This greatly simplifies the CMakeLists in Lagom, replacing many glob
patterns with a big list of libraries. There are still a few special
libraries that need some help to conform to the pattern, like LibELF and
LibWebView.

It also lets us remove essentially all of the Serenity or Lagom binary
directory detection logic from code generators, as now both projects
directories enter the generator logic from the same place.
This commit is contained in:
Andrew Kaster 2022-10-13 20:14:36 -06:00 committed by Linus Groh
parent a01c0e81f3
commit 1ae0cfd08b
12 changed files with 217 additions and 461 deletions

View file

@ -5,29 +5,35 @@ serenity_component(
)
set(SOURCES
AST.cpp
Builtin.cpp
Formatter.cpp
ImmediateFunctions.cpp
Job.cpp
NodeVisitor.cpp
Parser.cpp
Shell.cpp
SyntaxHighlighter.cpp
)
AST.cpp
Builtin.cpp
Formatter.cpp
ImmediateFunctions.cpp
Job.cpp
NodeVisitor.cpp
Parser.cpp
Shell.cpp
)
serenity_lib(LibShell shell)
target_link_libraries(LibShell LibCore LibLine LibSyntax LibRegex LibCodeComprehension)
target_link_libraries(LibShell LibCore LibLine LibSyntax LibRegex)
set(SOURCES
main.cpp
)
if (SERENITYOS)
target_sources(LibShell PRIVATE SyntaxHighlighter.cpp)
target_link_libraries(LibShell LibCodeComprehension)
endif()
serenity_bin(Shell)
target_link_libraries(Shell LibShell LibMain)
if (ENABLE_FUZZERS)
add_custom_target(Shell) # Stub target to placate serenity_component
else()
set(SOURCES main.cpp)
install(DIRECTORY Tests/ DESTINATION usr/Tests/Shell
PATTERN "Tests/*"
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ)
serenity_bin(Shell)
target_link_libraries(Shell LibShell LibMain)
install(DIRECTORY Tests/ DESTINATION usr/Tests/Shell
PATTERN "Tests/*"
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ)
endif()