mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Reapply "Convert build scripts to CMake (#13427)"
This reverts commit 374bb15db6.
This commit is contained in:
22
cmake/tools/SetupEsbuild.cmake
Normal file
22
cmake/tools/SetupEsbuild.cmake
Normal file
@@ -0,0 +1,22 @@
|
||||
include(Macros)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
setx(ESBUILD_EXECUTABLE ${CWD}/node_modules/.bin/esbuild.exe)
|
||||
else()
|
||||
setx(ESBUILD_EXECUTABLE ${CWD}/node_modules/.bin/esbuild)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COLOR_DIAGNOSTICS)
|
||||
set(ESBUILD_ARGS --color)
|
||||
endif()
|
||||
|
||||
register_command(
|
||||
COMMAND
|
||||
${BUN_EXECUTABLE}
|
||||
install
|
||||
--frozen-lockfile
|
||||
SOURCES
|
||||
${CWD}/package.json
|
||||
OUTPUTS
|
||||
${ESBUILD_EXECUTABLE}
|
||||
)
|
||||
Reference in New Issue
Block a user