summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibLocale
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-10-13 20:14:36 -0600
committerLinus Groh <mail@linusgroh.de>2022-10-16 16:36:39 +0200
commit1ae0cfd08b90bb0c2260ebb48a55b5b8b3d7eada (patch)
treecb03f0ba7397a0deee929190022c895317e30bed /Userland/Libraries/LibLocale
parenta01c0e81f32df9cdcc2a48ab77b2fdd191264b63 (diff)
downloadserenity-1ae0cfd08b90bb0c2260ebb48a55b5b8b3d7eada.zip
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.
Diffstat (limited to 'Userland/Libraries/LibLocale')
-rw-r--r--Userland/Libraries/LibLocale/CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/Userland/Libraries/LibLocale/CMakeLists.txt b/Userland/Libraries/LibLocale/CMakeLists.txt
index 3f767d3872..bb5913a443 100644
--- a/Userland/Libraries/LibLocale/CMakeLists.txt
+++ b/Userland/Libraries/LibLocale/CMakeLists.txt
@@ -2,7 +2,11 @@ include(${SerenityOS_SOURCE_DIR}/Meta/CMake/locale_data.cmake)
if (DEFINED LOCALE_DATA_SOURCES)
set(SOURCES ${LOCALE_DATA_SOURCES})
- serenity_lib(LibLocaleData localedata)
+ if (SERENITYOS)
+ serenity_lib(LibLocaleData localedata)
+ else()
+ add_library(LibLocaleData OBJECT ${SOURCES})
+ endif()
target_compile_options(LibLocaleData PRIVATE -g0 -Os -Wno-parentheses-equality)
target_link_libraries(LibLocaleData LibCore LibTimeZone)
endif()
@@ -20,5 +24,9 @@ target_link_libraries(LibLocale LibCore LibUnicode)
target_compile_definitions(LibLocale PRIVATE ENABLE_UNICODE_DATA=$<BOOL:${ENABLE_UNICODE_DATABASE_DOWNLOAD}>)
if (DEFINED LOCALE_DATA_SOURCES)
- add_dependencies(LibLocale LibLocaleData)
+ if (SERENITYOS)
+ add_dependencies(LibLocale LibLocaleData)
+ else()
+ target_link_libraries(LibLocale LibLocaleData)
+ endif()
endif()