Page 1 of 1

Consider adding support of CMake

Posted: Mon Feb 27, 2023 5:40 am
by xhw
The current way to build wimlib on Windows is difficult. I hope this change can make it buildable with Visual Studio.

Re: Consider adding support of CMake

Posted: Mon Feb 27, 2023 6:00 am
by synchronicity
Switching to CMake is something that I'm thinking about, but I don't work on wimlib much anymore.

Note that just switching to CMake would not be enough to allow wimlib to be built with Visual Studio. Many more changes would be required for that.

For now, building Windows binaries of wimlib on Windows using Cygwin and MinGW is documented in the README.WINDOWS file. Please let me know if you have any issues with it.

Re: Consider adding support of CMake

Posted: Mon Feb 27, 2023 2:26 pm
by xhw
But when building on cygwin, no Export Definition File (.def file) was created, which is required to create a Visual C compatible import library.

Re: Consider adding support of CMake

Posted: Mon Feb 27, 2023 6:42 pm
by synchronicity
It's definitely possible to create an import library (or a def file; isn't it only one or the other that's needed?) using the MinGW toolchain. A patch to do that and include it in the Windows release zip files would be appreciated!

Re: Consider adding support of CMake

Posted: Tue Feb 28, 2023 3:05 am
by synchronicity
Sorry, I forgot: the import library is already in the releases. It's the file devel/libwim.lib.

Are you sure you need a .def file too?

Re: Consider adding support of CMake

Posted: Tue Feb 28, 2023 4:26 am
by xhw
Yes, because the official binary release may not turn on optimization of it, and some feature may not enabled. Build from source code can fix these problems.

Re: Consider adding support of CMake

Posted: Tue Feb 28, 2023 5:07 am
by synchronicity
What do you mean by "may not turn on optimization of it, and some feature may not enabled"? What is preventing you from using the official binary release?

Anyway, if you need to build from source code anyway due to your own modifications, why do you care what files are in the binary release?