The migration to CMake opens the route to build SWI-Prolog on Windows using Microsoft Visual Studio. I pushed some updates to swipl-devel that allowed me building
swipl.exe for single-threaded use and without GMP. The CMake config run is
mkdir build.vs2019 cd build.vs2019 cmake -DMINGW_ROOT=z:/conan/win64 -DMULTI_THREADED=OFF -DUSE_GMP=OFF -DSWIPL_PACKAGES=OFF -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 16 2019" -A x64 ..
z:\conan\win64 is where I installed the zlib binary (dll and include), misusing the MinGW location handling for dependencies.
swipl.exewhich seems to work fine (minimal testing)
swipl-win.exefails for some Windows resource handling issue.
I’m wondering whether there are people out there who wish to take this to the next level. Some of the stuff that needs to be done:
- Think about the whole set of requirements. I considered using Conan. This deals with quite a few dependencies. Some problematic issues are GMP and ossp-uuid. Possibly more. Possibly there are better alternatives. The ports I found are in the table below.
|gmp||gmp/6.1.2@bincrafters/stable||Not for Windows|
|uuid||libuuid/1.0.3@bincrafters/stable||Not the OSSP version|
- Cleanup warnings
- CMake configure is really slow on Windows. Bypass checks for many functions, headers, etc we know are not on Windows anyway.
- Test, packaging, etc.
If you think this is a worthwhile exercise and you have relevant expertise, please jump in.