1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:27:45 +00:00

Meta: Define LagomMain outside of the BUILD_LAGOM branch

This allows code generators to use LagomMain. Otherwise, during CI, they
are built during the superbuild without BUILD_LAGOM=ON.
This commit is contained in:
Timothy Flynn 2021-11-23 12:34:31 -05:00 committed by Andreas Kling
parent 1539ed12f1
commit a2ea704d21

View file

@ -227,6 +227,16 @@ if (NOT APPLE)
target_link_libraries(LagomCore crypt) # Core::Account uses crypt() but it's not in libcrypt on macOS target_link_libraries(LagomCore crypt) # Core::Account uses crypt() but it's not in libcrypt on macOS
endif() endif()
# Main
file(GLOB LIBMAIN_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibMain/*.cpp")
lagom_lib(Main main
SOURCES ${LIBMAIN_SOURCES}
)
# The macOS linker is not happy about LibMain's main() calling an undefined symbol (serenity_main()).
if (APPLE)
target_link_options(LagomMain PRIVATE -undefined dynamic_lookup)
endif()
# Manually install AK headers # Manually install AK headers
install( install(
DIRECTORY "${SERENITY_PROJECT_ROOT}/AK" DIRECTORY "${SERENITY_PROJECT_ROOT}/AK"
@ -345,16 +355,6 @@ if (BUILD_LAGOM)
SOURCES ${LIBLINE_SOURCES} SOURCES ${LIBLINE_SOURCES}
) )
# Main
file(GLOB LIBMAIN_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibMain/*.cpp")
lagom_lib(Main main
SOURCES ${LIBMAIN_SOURCES}
)
# The macOS linker is not happy about LibMain's main() calling an undefined symbol (serenity_main()).
if (APPLE)
target_link_options(LagomMain PRIVATE -undefined dynamic_lookup)
endif()
# Markdown # Markdown
file(GLOB LIBMARKDOWN_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibMarkdown/*.cpp") file(GLOB LIBMARKDOWN_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibMarkdown/*.cpp")
lagom_lib(Markdown markdown lagom_lib(Markdown markdown