diff options
author | DexesTTP <dexes.ttp@gmail.com> | 2022-04-30 13:09:35 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-05-29 23:00:04 +0100 |
commit | 63e841c3ad53fb0736bfaac3b73eed2cc1ac51fb (patch) | |
tree | 80ffe956bf84fc2418c4e4eb116de893908e9af7 /Meta/CMake | |
parent | b388aa78763cc51b8c8075e0815bdc5676b3da7f (diff) | |
download | serenity-63e841c3ad53fb0736bfaac3b73eed2cc1ac51fb.zip |
Lagom: Build LibWeb on Lagom
Diffstat (limited to 'Meta/CMake')
-rw-r--r-- | Meta/CMake/libweb_generators.cmake | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/Meta/CMake/libweb_generators.cmake b/Meta/CMake/libweb_generators.cmake index 2296cdde9e..0e1d091000 100644 --- a/Meta/CMake/libweb_generators.cmake +++ b/Meta/CMake/libweb_generators.cmake @@ -1,8 +1,16 @@ function (generate_css_implementation) - set(LIBWEB_INPUT_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}") - set(LIBWEB_OUTPUT_FOLDER "") - set(LIBWEB_META_PREFIX "") + if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibWeb") + # Serenity build + SET(LIBWEB_INPUT_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}") + SET(LIBWEB_OUTPUT_FOLDER "") + SET(LIBWEB_META_PREFIX "") + else() + # Lagom Build + SET(LIBWEB_INPUT_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/../../Userland/Libraries/LibWeb") + SET(LIBWEB_OUTPUT_FOLDER "LibWeb/") + SET(LIBWEB_META_PREFIX "Lagom") + endif() invoke_generator( "Enums.cpp" @@ -84,9 +92,17 @@ endfunction() function (generate_js_wrappers target) - set(LIBWEB_INPUT_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}") - set(LIBWEB_OUTPUT_FOLDER "") - set(LIBWEB_META_PREFIX "") + if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibWeb") + # Serenity build + SET(LIBWEB_INPUT_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}") + SET(LIBWEB_OUTPUT_FOLDER "") + SET(LIBWEB_META_PREFIX "") + else() + # Lagom Build + SET(LIBWEB_INPUT_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/../../Userland/Libraries/LibWeb") + SET(LIBWEB_OUTPUT_FOLDER "LibWeb/") + SET(LIBWEB_META_PREFIX "Lagom") + endif() function(libweb_js_wrapper class) cmake_parse_arguments(PARSE_ARGV 1 LIBWEB_WRAPPER "ITERABLE" "" "") |