mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-26 12:17:52 +00:00
CMake: Move Utilities build rules to Utilities directory
This commit is contained in:
parent
94a20f6706
commit
1878ed10d2
Notes:
github-actions[bot]
2025-05-19 22:39:11 +00:00
Author: https://github.com/ADKaster
Commit: 1878ed10d2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4821
Reviewed-by: https://github.com/trflynn89 ✅
2 changed files with 30 additions and 31 deletions
|
@ -414,37 +414,7 @@ if (ENABLE_FUZZERS OR ENABLE_COMPILER_EXPLORER_BUILD OR ANDROID OR IOS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Lagom Utilities
|
# Lagom Utilities
|
||||||
lagom_utility(abench SOURCES ../../Utilities/abench.cpp LIBS LibMain LibFileSystem LibMedia)
|
add_serenity_subdirectory(Utilities)
|
||||||
|
|
||||||
lagom_utility(dns SOURCES ../../Utilities/dns.cpp LIBS LibDNS LibMain LibTLS LibCrypto)
|
|
||||||
|
|
||||||
if (ENABLE_GUI_TARGETS)
|
|
||||||
lagom_utility(animation SOURCES ../../Utilities/animation.cpp LIBS LibGfx LibMain)
|
|
||||||
lagom_utility(image SOURCES ../../Utilities/image.cpp LIBS LibGfx LibMain)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
lagom_utility(js SOURCES ../../Utilities/js.cpp LIBS LibCrypto LibJS LibLine LibUnicode LibMain LibTextCodec LibGC Threads::Threads)
|
|
||||||
lagom_utility(test262-runner SOURCES ../../Utilities/test262-runner.cpp LIBS LibJS LibFileSystem LibGC)
|
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
||||||
include(CheckCSourceCompiles)
|
|
||||||
# Check for musl's declaration of __assert_fail
|
|
||||||
check_c_source_compiles(
|
|
||||||
"
|
|
||||||
#include <assert.h>
|
|
||||||
__attribute__((__noreturn__)) void __assert_fail(char const* assertion, char const* file, int line, char const* function) {}
|
|
||||||
int main() {}
|
|
||||||
"
|
|
||||||
ASSERT_FAIL_HAS_INT
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (ASSERT_FAIL_HAS_INT OR EMSCRIPTEN)
|
|
||||||
target_compile_definitions(test262-runner PRIVATE ASSERT_FAIL_HAS_INT)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
lagom_utility(wasm SOURCES ../../Utilities/wasm.cpp LIBS LibFileSystem LibWasm LibLine LibMain)
|
|
||||||
lagom_utility(xml SOURCES ../../Utilities/xml.cpp LIBS LibFileSystem LibMain LibXML LibURL)
|
|
||||||
|
|
||||||
include(CTest)
|
include(CTest)
|
||||||
if (BUILD_TESTING)
|
if (BUILD_TESTING)
|
||||||
|
|
29
Utilities/CMakeLists.txt
Normal file
29
Utilities/CMakeLists.txt
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
lagom_utility(abench SOURCES abench.cpp LIBS LibMain LibFileSystem LibMedia)
|
||||||
|
lagom_utility(dns SOURCES dns.cpp LIBS LibDNS LibMain LibTLS LibCrypto)
|
||||||
|
|
||||||
|
if (ENABLE_GUI_TARGETS)
|
||||||
|
lagom_utility(animation SOURCES animation.cpp LIBS LibGfx LibMain)
|
||||||
|
lagom_utility(image SOURCES image.cpp LIBS LibGfx LibMain)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
lagom_utility(js SOURCES js.cpp LIBS LibCrypto LibJS LibLine LibUnicode LibMain LibTextCodec LibGC Threads::Threads)
|
||||||
|
lagom_utility(test262-runner SOURCES test262-runner.cpp LIBS LibJS LibFileSystem LibGC)
|
||||||
|
|
||||||
|
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
include(CheckCSourceCompiles)
|
||||||
|
# Check for musl's declaration of __assert_fail
|
||||||
|
check_c_source_compiles("
|
||||||
|
#include <assert.h>
|
||||||
|
__attribute__((__noreturn__)) void __assert_fail(char const* assertion, char const* file, int line, char const* function) {}
|
||||||
|
int main() {}
|
||||||
|
"
|
||||||
|
ASSERT_FAIL_HAS_INT
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (ASSERT_FAIL_HAS_INT OR EMSCRIPTEN)
|
||||||
|
target_compile_definitions(test262-runner PRIVATE ASSERT_FAIL_HAS_INT)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
lagom_utility(wasm SOURCES wasm.cpp LIBS LibFileSystem LibWasm LibLine LibMain)
|
||||||
|
lagom_utility(xml SOURCES xml.cpp LIBS LibFileSystem LibMain LibXML LibURL)
|
Loading…
Add table
Add a link
Reference in a new issue