Skip to content

Commit

Permalink
Solve minor bugs with NodeJS paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Dec 15, 2021
1 parent f5ee256 commit c7199cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ rem Install NodeJS
powershell -Command "$global:ProgressPreference = 'SilentlyContinue'; Expand-Archive" -Path "node.zip" -DestinationPath %loc%\runtimes\nodejs || goto :error
robocopy /move /e %loc%\runtimes\nodejs\node-v14.18.2-win-x64 %loc%\runtimes\nodejs /NFL /NDL /NJH /NJS /NC /NS /NP
rmdir %loc%\runtimes\nodejs\node-v14.18.2-win-x64
set PATH=%PATH%;%loc%\runtimes\nodejs\bin
set PATH=%PATH%;%loc%\runtimes\nodejs

rem Install NodeJS Headers
cmake -E tar xzf node_headers.tar.gz || goto :error
Expand Down Expand Up @@ -139,7 +139,7 @@ echo mark_as_advanced(DOTNET_COMMAND DOTNET_MIGRATE DOTNET_VERSION)>> %loc%\core

rem Patch for FindNodeJS.cmake
echo set(NodeJS_VERSION 14.18.2)> %loc%\core\cmake\FindNodeJS.cmake
echo set(NodeJS_INCLUDE_DIRS "%escaped_loc%/runtimes/nodejs/include")>> %loc%\core\cmake\FindNodeJS.cmake
echo set(NodeJS_INCLUDE_DIRS "%escaped_loc%/runtimes/nodejs/include/node")>> %loc%\core\cmake\FindNodeJS.cmake
echo set(NodeJS_LIBRARY "%escaped_loc%/runtimes/nodejs/lib/libnode.lib")>> %loc%\core\cmake\FindNodeJS.cmake
echo set(NodeJS_EXECUTABLE "%escaped_loc%/runtimes/nodejs/node.exe")>> %loc%\core\cmake\FindNodeJS.cmake
echo include(FindPackageHandleStandardArgs)>> %loc%\core\cmake\FindNodeJS.cmake
Expand All @@ -159,6 +159,7 @@ cmake -Wno-dev ^
-DOPTION_BUILD_EXAMPLES=OFF ^
-DOPTION_BUILD_LOADERS_PY=ON ^
-DOPTION_BUILD_LOADERS_NODE=ON ^
-DNPM_ROOT="%escaped_loc%/runtimes/nodejs" ^
-DOPTION_BUILD_LOADERS_CS=ON ^
-DOPTION_BUILD_LOADERS_RB=ON ^
-DOPTION_BUILD_LOADERS_TS=ON ^
Expand Down

0 comments on commit c7199cc

Please sign in to comment.