summaryrefslogtreecommitdiff
path: root/Meta
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-10-16 23:48:14 -0600
committerLinus Groh <mail@linusgroh.de>2022-10-17 15:55:55 +0200
commit8160b5322863732a401655f49ba8d9d894cb5f38 (patch)
tree4d6d3bf70b69c757799165cabddf5920cf83b65a /Meta
parent3f13959c68b6e0a632bcea20b2015c9aaaadfa5d (diff)
downloadserenity-8160b5322863732a401655f49ba8d9d894cb5f38.zip
Lagom: Make lagom_lib take names prefixed with Lib
This matches serenity_lib, and consolidates the logic to strip Lib from the front of the library name for the Lagom export name into one place at the top of lagom_lib.
Diffstat (limited to 'Meta')
-rw-r--r--Meta/Lagom/CMakeLists.txt16
1 files changed, 7 insertions, 9 deletions
diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt
index 829dfd7f76..0131c91bd8 100644
--- a/Meta/Lagom/CMakeLists.txt
+++ b/Meta/Lagom/CMakeLists.txt
@@ -179,9 +179,9 @@ install(
COMPONENT Lagom_Development
)
-function(lagom_lib library fs_name)
+function(lagom_lib target_name fs_name)
cmake_parse_arguments(LAGOM_LIBRARY "" "LIBRARY_TYPE" "SOURCES;LIBS" ${ARGN})
- set(target_name "Lib${library}")
+ string(REPLACE "Lib" "" library ${target_name})
if (NOT LAGOM_LIBRARY_LIBRARY_TYPE)
set(LAGOM_LIBRARY_LIBRARY_TYPE "")
endif()
@@ -257,13 +257,11 @@ function(serenity_bin name)
endfunction()
function(serenity_lib name fs_name)
- string(REPLACE "Lib" "" name_without_lib ${name})
- lagom_lib(${name_without_lib} ${fs_name} SOURCES ${SOURCES} ${GENERATED_SOURCES})
+ lagom_lib(${name} ${fs_name} SOURCES ${SOURCES} ${GENERATED_SOURCES})
endfunction()
function(serenity_lib_static name fs_name)
- string(REPLACE "Lib" "" name_without_lib ${name})
- lagom_lib(${name_without_lib} ${fs_name} LIBRARY_TYPE STATIC SOURCES ${SOURCES} ${GENERATED_SOURCES})
+ lagom_lib(${name} ${fs_name} LIBRARY_TYPE STATIC SOURCES ${SOURCES} ${GENERATED_SOURCES})
endfunction()
function(serenity_install_headers dir)
@@ -374,7 +372,7 @@ if (BUILD_LAGOM)
list(APPEND LIBWEBVIEW_GENERATED_SOURCES WebContent/WebContentClientEndpoint.h)
list(APPEND LIBWEBVIEW_GENERATED_SOURCES WebContent/WebContentServerEndpoint.h)
- lagom_lib(WebView webview
+ lagom_lib(LibWebView webview
SOURCES ${LIBWEBVIEW_SOURCES} ${LIBWEBVIEW_GENERATED_SOURCES}
LIBS LibGUI LibWeb)
endif()
@@ -386,7 +384,7 @@ if (BUILD_LAGOM)
file(GLOB LIBELF_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibELF/*.cpp")
# There's no way we can reliably make the dynamic loading classes cross platform
list(FILTER LIBELF_SOURCES EXCLUDE REGEX ".*Dynamic.*.cpp$")
- lagom_lib(ELF elf
+ lagom_lib(LibELF elf
SOURCES ${LIBELF_SOURCES}
)
list(APPEND lagom_standard_libraries X86)
@@ -406,7 +404,7 @@ if (BUILD_LAGOM)
ModelIndex.cpp
)
list(TRANSFORM LIBGUI_SOURCES PREPEND "${SERENITY_PROJECT_ROOT}/Userland/Libraries/LibGUI/")
- lagom_lib(GUI gui
+ lagom_lib(LibGUI gui
SOURCES ${LIBGUI_SOURCES}
LIBS LibGfx LibSyntax)