Reapply "Convert build scripts to CMake (#13427)"

This reverts commit 374bb15db6.
This commit is contained in:
Ashcon Partovi
2024-09-11 08:24:50 -07:00
parent 3e904303ac
commit d39e422b20
223 changed files with 4468 additions and 44770 deletions

View 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}
)