Some of the wxWidgets samples with CMake build files for vcpkg
- Install vcpkg by following the instructions here
- Install wxwidgets with command
vcpkg install wxwidgets:x64-windows
- Clone this
wxwidgets-cmake
repo - Open Visual Studio, select Open Folder and browse to the
wxwidgets-cmake
directory. CMake will kick in and generate build files. - Select
Build all
- Select a sample application in startup target pull down menu
- Select
Debug->Start without debugging
- Create an
x64-Release
configuration inProject->CMake settings->Configurations
and save withCtrl+S
- Select the
x64-Release
configuration and selectBuild all
In order to use vcpkg with CMake outside of an IDE, you can use the toolchain file:
> cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
> cmake --build [build directory]```