metacall/distributable-windows

Enable loaders and link them to the locally installed runtimes

viferga opened this issue · 1 comments

Enable each loader and link it to the correct path in the local folder.

For enabling the loaders, you must add the following options:

-DOPTION_BUILD_LOADERS_PY=ON -DOPTION_BUILD_LOADERS_NODE=ON -DOPTION_BUILD_LOADERS_CS=ON -DOPTION_BUILD_LOADERS_RB=ON -DOPTION_BUILD_LOADERS_TS=ON

Here's the complete list:
https://github.com/metacall/core/blob/ba0d8b49d765b72feae26ccc690a64afb4b30f59/source/loaders/CMakeLists.txt#L7

As they are being built in local folders, probably you will need to link them manually, you will face some problems when doing this. One option is to manually overwrite the variables after cloning, I had to do that in Guix because some CMake Find scripts are not configurable.

This is the way of doing it in NetCore: https://github.com/metacall/core/blob/ba0d8b49d765b72feae26ccc690a64afb4b30f59/tools/metacall-configure.sh#L201

Only FindNodeJS.cmake patch remaining:

rem TODO: Patch for FindNodeJS.cmake