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

Build: Switch to CMake :^)

Closes https://github.com/SerenityOS/serenity/issues/2080
This commit is contained in:
Sergey Bugaev 2020-05-06 18:40:06 +03:00 committed by Andreas Kling
parent 49727ffee4
commit 450a2a0f9c
236 changed files with 1774 additions and 2337 deletions

View file

@ -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)

View file

@ -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