Skip to content

Commit

Permalink
Update windows build instructions, lock windows SDK version for consi…
Browse files Browse the repository at this point in the history
…stency
  • Loading branch information
redbaron committed Oct 9, 2024
1 parent 806b83d commit a0e298e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,32 @@ git submodule update --filter=blob:none --init ':!submodules/devkits' ':!submodu

### Windows

Use following command from powershell to install minimal set of required dependencies
```
winget install Git.Git Ninja-build.Ninja Kitware.CMake
winget install Microsoft.VisualStudio.2022.BuildTools --override ("--wait " +
"--passive " +
"--add Microsoft.VisualStudio.Component.VC.Tools.ARM " +
"--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 " +
"--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 " +
"--add Microsoft.VisualStudio.Component.Windows11SDK.22621 ")
```


- Git
- [CMake >= 3.29](https://cmake.org/download/)
- [Ninja](https://ninja-build.org/)
- [Build Tools for Visual Studio 2022](https://visualstudio.microsoft.com/downloads/)
- Windows 11 SDK v.22000


### Linux

- CMake
- Ninja
- gcc-c++/clang++
- libcurl-dev (Debian/Ubuntu) or libcurl-devel (RPM based distros)

Fedora:
```
Expand Down Expand Up @@ -390,7 +407,7 @@ Our SDK integrates with vcpkg by providing itself and a few dependencies through
"repository": "https://github.com/heroiclabs/nakama-vcpkg-registry",
"baseline": "<commit>",
"reference": "<branch>",
"packages": ["nakama-sdk", "wslay"]
"packages": ["nakama-sdk"]
}
]
}
Expand All @@ -400,10 +417,5 @@ Then you can add it as you would any other vcpkg port in your `vcpkg.json`:
"dependencies": [
{
"name": "nakama-sdk"
"features": [<desired-feature-1>, <desired-feature-2>]
}]
```

vcpkg does not currently allow us to provide default features per platform, so you must specify your desired transports/features in your own vcpkg.json.

For an example, look at how our [cocos-2d-x client](https://github.com/heroiclabs/nakama-cocos2d-x.git) does this. Also see our [our built-in transports](#transports) for each platform that we represent with vcpkg features. If you do not specify a transport for the platform, the client will expect you to pass in your own at runtime.
1 change: 1 addition & 0 deletions cmake/toolchains/vcpkg-msvc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ endif()

if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION)
set(CMAKE_SYSTEM_VERSION "${VCPKG_CMAKE_SYSTEM_VERSION}" CACHE STRING "" FORCE)
set(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION "${VCPKG_CMAKE_SYSTEM_VERSION}")
elseif(NOT DEFINED CMAKE_SYSTEM_VERSION)
message(FATAL_ERROR "BUG: We should align vcpkg dependencies and our project on Windows SDK version. Include triplet vars in main project")
endif()
Expand Down

0 comments on commit a0e298e

Please sign in to comment.