On Thu, Aug 7, 2025 at 2:22 PM Daniel Sahlberg <daniel.l.sahlb...@gmail.com> wrote:
> Den tis 5 aug. 2025 kl 19:27 skrev Graham Leggett via dev < > dev@subversion.apache.org>: > >> Hi all, >> >> I am keen to build subversion-trunk on Windows using cmake and bleeding >> edge dependencies (serf-trunk, apr-trunk, etc). >> >> Does anyone have a script / recipe to do this in a single step? >> >> I have Visual Studio 2022 on Windows 11 via ssh, so ideally something >> command line based. >> >> Does such a thing exist? >> >> Regards, >> Graham >> -- >> >> > Hi, > > I've so far only built it using vcpkg supplied dependencies, so sorry no. > I do think it would be valuable to have such a script! > > I think our primary expert on Windows is Timofei, I hope he can chime in! > > Cheers, > Daniel > > > I was planning to respond anyway... Sorry for the delay. With cmake, you can build each of apr, serf, and subversion using just a few simple commands per project. Here is how they'd generally look like: ``` cmake -S <source> -B <source>/out [extra opts] -DCMAKE_INSTALL_PREFIX <libs> cmake --build <source>/out cmake --install <source>/out ``` So the complete script would contain something like: ```pwsh # checkout projects svn checkout https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x apr svn checkout https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x apr-util svn checkout https://svn.apache.org/repos/asf/serf/trunk serf svn checkout https://svn.apache.org/repos/asf/subversion/trunk svn # deps git clone https://github.com/microsoft/vcpkg Push-Location vcpkg .\bootstrap-vcpkg.bat -disableMetrics .\vcpkg install expat zlib sqlite3 openssl Pop-Location # compiled binaries and libraries will appear in this directory mkdir install Copy-Item -Recurse .\vcpkg\installed\x64-windows\* install # let's keep the source trees clean, by utilising out-of-tree build mkdir build # apr cmake -S apr -B build/apr -DCMAKE_INSTALL_PREFIX=install cmake --build .\build\apr\ cmake --install .\build\apr\ --config Debug # apr-util cmake -S apr-util -B build/apr-util -DCMAKE_INSTALL_PREFIX=install cmake --build .\build\apr-util\ cmake --install .\build\apr-util\ --config Debug # serf cmake -S serf -B build/serf -DCMAKE_INSTALL_PREFIX=install cmake --build .\build\serf\ cmake --install .\build\serf\ --config Debug # svn cmake -S svn -B build/svn -DCMAKE_INSTALL_PREFIX=install cmake --build .\build\svn\ cmake --install .\build\svn\ --config Debug ``` #worksforme It's pretty much the same commands for every project assuming dependecies are set up. This is why I don't think there is a need for a script; The steps are still simple, but someone may want to modify something for their needs. For example, use apr-2 instead of apr+apr-util, customise some projects or build configurations using options, or use ninja instead of vcnet. On the other hand, I think it might be cool to include this set of commands to the INSTALL guide instead. However, it's much simpler to use visual studio support for cmake projects, since you can keep track of each option and take advantage of using GUI, ninja generator, etc. -- Timofei Zhakov