summaryrefslogtreecommitdiff
path: root/Meta/Lagom
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@serenityos.org>2020-05-06 18:40:06 +0300
committerAndreas Kling <kling@serenityos.org>2020-05-14 20:15:18 +0200
commit450a2a0f9ce2443bc06445ee018c9860d8cd5fc8 (patch)
treec124a612ef259b764855af5e33c39e0d09ad4df2 /Meta/Lagom
parent49727ffee424d8c0038ce18b91b0bf0ff33b1a4d (diff)
downloadserenity-450a2a0f9ce2443bc06445ee018c9860d8cd5fc8.zip
Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
Diffstat (limited to 'Meta/Lagom')
-rw-r--r--Meta/Lagom/CMakeLists.txt37
-rwxr-xr-xMeta/Lagom/build-js.sh8
2 files changed, 22 insertions, 23 deletions
diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt
index 492c934455..08fdecf34b 100644
--- a/Meta/Lagom/CMakeLists.txt
+++ b/Meta/Lagom/CMakeLists.txt
@@ -46,28 +46,35 @@ file(GLOB LIBX86_SOURCES "../../Libraries/LibX86/*.cpp")
file(GLOB LIBJS_SOURCES "../../Libraries/LibJS/*.cpp")
file(GLOB LIBJS_SUBDIR_SOURCES "../../Libraries/LibJS/*/*.cpp")
-set(SOURCES ${AK_SOURCES} ${LIBCORE_SOURCES} ${LIBIPC_SOURCES} ${LIBLINE_SOURCES} ${LIBJS_SOURCES} ${LIBJS_SUBDIR_SOURCES} ${LIBX86_SOURCES})
+set(LAGOM_CORE_SOURCES ${AK_SOURCES} ${LIBCORE_SOURCES})
+set(LAGOM_MORE_SOURCES ${LIBIPC_SOURCES} ${LIBLINE_SOURCES} ${LIBJS_SOURCES} ${LIBJS_SUBDIR_SOURCES} ${LIBX86_SOURCES})
include_directories (../../)
include_directories (../../Libraries/)
-add_library(lagom ${SOURCES})
+add_library(LagomCore ${LAGOM_CORE_SOURCES})
-add_executable(TestApp TestApp.cpp)
-target_link_libraries(TestApp lagom)
-target_link_libraries(TestApp stdc++)
+if (BUILD_LAGOM)
+ add_library(Lagom $<TARGET_OBJECTS:LagomCore> ${LAGOM_MORE_SOURCES})
-add_executable(TestJson TestJson.cpp)
-target_link_libraries(TestJson lagom)
-target_link_libraries(TestJson stdc++)
+ add_executable(TestApp TestApp.cpp)
+ target_link_libraries(TestApp Lagom)
+ target_link_libraries(TestApp stdc++)
-add_executable(js ../../Userland/js.cpp)
-target_link_libraries(js lagom)
-target_link_libraries(js stdc++)
-target_link_libraries(js pthread)
+ add_executable(TestJson TestJson.cpp)
+ target_link_libraries(TestJson Lagom)
+ target_link_libraries(TestJson stdc++)
-add_executable(disasm ../../Userland/disasm.cpp)
-target_link_libraries(disasm lagom)
-target_link_libraries(disasm stdc++)
+ add_executable(js_lagom ../../Userland/js.cpp)
+ set_target_properties(js_lagom PROPERTIES OUTPUT_NAME js)
+ target_link_libraries(js_lagom Lagom)
+ target_link_libraries(js_lagom stdc++)
+ target_link_libraries(js_lagom pthread)
+
+ add_executable(disasm_lagom ../../Userland/disasm.cpp)
+ set_target_properties(disasm_lagom PROPERTIES OUTPUT_NAME disasm)
+ target_link_libraries(disasm_lagom Lagom)
+ target_link_libraries(disasm_lagom stdc++)
+endif()
if (ENABLE_FUZZER_SANITIZER)
add_subdirectory(Fuzzers)
diff --git a/Meta/Lagom/build-js.sh b/Meta/Lagom/build-js.sh
deleted file mode 100755
index 10827428f3..0000000000
--- a/Meta/Lagom/build-js.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
-cd "$script_path" || exit 1
-mkdir -p build
-cd build || exit 1
-cmake ..
-make js