mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 04:49:06 +00:00
63 lines
1.2 KiB
CMake
63 lines
1.2 KiB
CMake
cmake_minimum_required(VERSION 3.24)
|
|
message(STATUS "Configuring Bun")
|
|
|
|
list(APPEND CMAKE_MODULE_PATH
|
|
${CMAKE_SOURCE_DIR}/cmake
|
|
${CMAKE_SOURCE_DIR}/cmake/targets
|
|
${CMAKE_SOURCE_DIR}/cmake/tools
|
|
${CMAKE_SOURCE_DIR}/cmake/analysis
|
|
${CMAKE_SOURCE_DIR}/cmake/scripts
|
|
)
|
|
|
|
include(Policies)
|
|
include(Globals)
|
|
|
|
# --- Compilers ---
|
|
|
|
if(CMAKE_HOST_APPLE)
|
|
include(SetupMacSDK)
|
|
endif()
|
|
include(SetupLLVM)
|
|
include(SetupCcache)
|
|
|
|
# --- Project ---
|
|
|
|
parse_package_json(VERSION_VARIABLE DEFAULT_VERSION)
|
|
optionx(VERSION STRING "The version of Bun" DEFAULT ${DEFAULT_VERSION})
|
|
project(Bun VERSION ${VERSION})
|
|
include(Options)
|
|
include(CompilerFlags)
|
|
|
|
# --- Tools ---
|
|
|
|
include(SetupBuildkite)
|
|
include(SetupBun)
|
|
include(SetupEsbuild)
|
|
include(SetupZig)
|
|
include(SetupRust)
|
|
|
|
# --- Targets ---
|
|
|
|
include(BuildBoringSSL)
|
|
include(BuildBrotli)
|
|
include(BuildCares)
|
|
include(BuildLibDeflate)
|
|
include(BuildLibuv)
|
|
include(BuildLolHtml)
|
|
include(BuildLshpack)
|
|
include(BuildMimalloc)
|
|
include(BuildPicoHTTPParser)
|
|
include(BuildTinyCC)
|
|
include(BuildSQLite)
|
|
include(BuildWebKit)
|
|
include(BuildZlib)
|
|
include(BuildLibArchive) # must be loaded after zlib
|
|
include(BuildZstd)
|
|
include(BuildBun)
|
|
|
|
# --- Analysis ---
|
|
|
|
include(RunClangFormat)
|
|
include(RunClangTidy)
|
|
include(RunZigFormat)
|