mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
Meta: Prefer SerenityOS_SOURCE_DIR to CMAKE_SOURCE_DIR
By using SerenityOS_SOURCE_DIR we can make custom targets and commands agnostic to the actual location of the root CMakeLists directory. All we care about is the root of the SerenityOS project.
This commit is contained in:
parent
20e904d87c
commit
47471c0ec2
3 changed files with 26 additions and 25 deletions
|
@ -1,9 +1,10 @@
|
|||
option(INCLUDE_WASM_SPEC_TESTS "Download and include the WebAssembly spec testsuite" OFF)
|
||||
|
||||
if(INCLUDE_WASM_SPEC_TESTS)
|
||||
set(SOURCE_DIR ${CMAKE_SOURCE_DIR})
|
||||
if (CMAKE_SOURCE_DIR MATCHES ".*/Lagom")
|
||||
set(SOURCE_DIR ${SOURCE_DIR}/../..)
|
||||
if (CMAKE_PROJECT_NAME STREQUAL "SerenityOS")
|
||||
set(SOURCE_DIR "${SerenityOS_SOURCE_DIR}")
|
||||
else()
|
||||
set(SOURCE_DIR "${SERENITY_PROJECT_ROOT}")
|
||||
endif()
|
||||
set(WASM_SPEC_TEST_GZ_URL https://github.com/WebAssembly/testsuite/archive/refs/heads/master.tar.gz)
|
||||
set(WASM_SPEC_TEST_GZ_PATH ${CMAKE_BINARY_DIR}/wasm-spec-testsuite.tar.gz)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue