Consider adding support of CMake

Comments, questions, bug reports, etc.
Post Reply
xhw
Posts: 8
Joined: Sat Feb 25, 2023 3:52 am

Consider adding support of CMake

Post by xhw »

The current way to build wimlib on Windows is difficult. I hope this change can make it buildable with Visual Studio.
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: Consider adding support of CMake

Post 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.
xhw
Posts: 8
Joined: Sat Feb 25, 2023 3:52 am

Re: Consider adding support of CMake

Post 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.
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: Consider adding support of CMake

Post 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!
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: Consider adding support of CMake

Post 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?
xhw
Posts: 8
Joined: Sat Feb 25, 2023 3:52 am

Re: Consider adding support of CMake

Post 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.
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: Consider adding support of CMake

Post 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?
Post Reply