[DEPRECATED] [WINDOWS] Compiling GZDoom with CMake GUI, Visual Studio and vcpkg

Handy guides on how to do things, written by users for users.

Moderators: GZDoom Developers, Raze Developers

Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.
User avatar
Nash
 
 
Posts: 17462
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

[DEPRECATED] [WINDOWS] Compiling GZDoom with CMake GUI, Visual Studio and vcpkg

Post by Nash »

Deprecated as of April 2024. You don't need vcpkg anymore.
Spoiler:
Last edited by Nash on Sun Apr 14, 2024 9:42 am, edited 2 times in total.
User avatar
Rachael
Posts: 13780
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Compiling GZDoom with CMake GUI, Visual Studio and vcpkg

Post by Rachael »

Thank you for doing this Nash. You turned my technical babblespeak into something everyone could use. And you also were the one to figure out that the only piece of the puzzle that was missing was the toolchain file thing - it was my mistake to not think of that, first.
Iluin
Posts: 3
Joined: Tue Aug 22, 2023 6:05 am

Re: Compiling GZDoom with CMake GUI, Visual Studio and vcpkg

Post by Iluin »

> Step 2: Inside the newly-cloned vcpkg folder, run bootstrap-vcpkg.bat (Windows) or bootstrap-vcpkg.sh (other OSes). It should finish fairly quickly. That's fine.

That step is not required in manifest mode. vcpkg should be able to bootstrap itself.
User avatar
MartinHowe
Posts: 2042
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom

Re: Compiling GZDoom with CMake GUI, Visual Studio and vcpkg

Post by MartinHowe »

This is good for the GUI crowd, but what about terminal only building? I have a set of scripts that "just work" for building GZDoom and would hate to see them require user input during the process :( Presumably it will still be possible on Linux to build entirely from terminal commands?
User avatar
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm

Re: Compiling GZDoom with CMake GUI, Visual Studio and vcpkg

Post by JPL »

Might be worth appending "in Windows" to the title of this thread to preempt people coming into this thread to ask about support for other build methods / OSes. Likewise a separate "compiling the new way in Linux" might be able to collect what would otherwise be lots of smaller more isolated support requests.
User avatar
Jay0
 
 
Posts: 63
Joined: Tue Aug 21, 2018 9:31 pm
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Compiling GZDoom with CMake GUI, Visual Studio and vcpkg

Post by Jay0 »

JPL wrote: Wed Aug 23, 2023 2:05 pm "compiling the new way in Linux"
The "old" way isn't really going away, what this update is doing is adding vcpkg support and removing the bundled windows dependencies -- ex. on Linux you'll be free to continue using the system package manager, use vcpkg, or get the dependencies you need any other method (basically, the build method for non-windows platfoms hasn't changed at all)
User avatar
Nash
 
 
Posts: 17462
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Compiling GZDoom with CMake GUI, Visual Studio and vcpkg

Post by Nash »

JPL wrote: Wed Aug 23, 2023 2:05 pm Might be worth appending "in Windows" to the title of this thread to preempt people coming into this thread to ask about support for other build methods / OSes. Likewise a separate "compiling the new way in Linux" might be able to collect what would otherwise be lots of smaller more isolated support requests.
Done.
MartinHowe wrote: Wed Aug 23, 2023 11:02 am This is good for the GUI crowd, but what about terminal only building? I have a set of scripts that "just work" for building GZDoom and would hate to see them require user input during the process :( Presumably it will still be possible on Linux to build entirely from terminal commands?
Yeah sorry this thread is only for the GUI crowd, for command lines, only new thing you need to add to your CMake call is the -DCMAKE_TOOLCHAIN_FILE=<path to vcpkg.cmake> parameter. I won't be covering it though, someone else may feel free to take care of that. :D
User avatar
Rachael
Posts: 13780
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: [WINDOWS] Compiling GZDoom with CMake GUI, Visual Studio and vcpkg

Post by Rachael »

It's basically the same for other OS's, and Cmake-GUI is available on all platforms, so saying "for windows" is really a bit misleading.

The command line is indeed just simply using -DCMAKE_TOOLCHAIN_FILE to point to your vcpkg installation with the script inside, it requires a very specific file but it should be pretty clear which one if you follow the instructions here.
User avatar
MartinHowe
Posts: 2042
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom

Re: [WINDOWS] Compiling GZDoom with CMake GUI, Visual Studio and vcpkg

Post by MartinHowe »

Thanks everyone, I'll look into this next time I need to build it. Hopefully the Wiki for it will be updated eventually.
User avatar
Major Cooke
Posts: 8196
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: [WINDOWS] Compiling GZDoom with CMake GUI, Visual Studio and vcpkg

Post by Major Cooke »

And the windows instructions need updating as well but also there has to be a way not to rely upon vcpkg. Apparently all someone has to do is not load the toolchain file, build libwebp with 'vcpkg install' and link manually to it, but right now I'm struggling with some of this.

If it could be explained more in detail, that'd be definitely appreciated.

To be clear, I've only ever set up GZDoom before and I've never had to deal with this prior.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49176
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [WINDOWS] Compiling GZDoom with CMake GUI, Visual Studio and vcpkg

Post by Graf Zahl »

There isn't really more to it. All you need is manually provide the path to libwebp.
The path should be {vcpkg_dir}/installed/x64-windows-static/share/WebP

For just building an EXE, and not working with the project, auto-setup-windows.cmd should be enough. It downloads everything you need, except CMake and then builds everything in one go.
User avatar
Nash
 
 
Posts: 17462
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: [DEPRECATED] [WINDOWS] Compiling GZDoom with CMake GUI, Visual Studio and vcpkg

Post by Nash »

Deprecated as of April 2024. You don't need vcpkg anymore.

Return to “Tutorials”