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.
Status:
- Builds
swipl.exe
which seems to work fine (minimal testing) -
swipl-win.exe
fails 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.
Name | Conan place | Remarks |
---|---|---|
bdb | https://github.com/bincrafters/conan-libdb | |
gmp | gmp/6.1.2@bincrafters/stable | Not for Windows |
jpeg | libjpeg/9c@bincrafters/stable | |
libarchive | https://github.com/appimage-conan-community/conan-libarchive | |
libffi | libffi/3.2.1@bincrafters/stable | |
libyaml | libyaml/0.2.2@bincrafters/stable | |
openssl | OpenSSL/latest_1.1.1x@conan/stable | |
pcre | pcre2/10.32@bincrafters/stable | |
pthread-win32 | ? | |
uuid | libuuid/1.0.3@bincrafters/stable | Not the OSSP version |
zlib | zlib/1.2.11@conan/stable |
- 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.