| 254 | |
| 255 | == NVTT == |
| 256 | |
| 257 | '''Note:''' We build the custom version included in SVN. Depends on libpng and zlib, so if you're building those too, do that first. |
| 258 | |
| 259 | * CMake GUI-based build: |
| 260 | * [https://www.microsoft.com/en-us/download/details.aspx?id=6812 Download] and install Microsoft DirectX SDK (June 2010) |
| 261 | * Open `X:\path\to\0ad\libraries\source\nvtt\src\CMakeLists.txt` in a text editor, remove or comment out all blocks referencing WIN32/gnuwin32, and save. |
| 262 | * Open cmake-gui (v3.14 in this example) |
| 263 | * Set source location to `X:\path\to\0ad\libraries\source\nvtt\src` |
| 264 | * Set build location to `X:\path\to\0ad\libraries\source\nvtt\src\build` |
| 265 | * Press '''Configure''' |
| 266 | * Choose '''Yes''' to create the build directory if it doesn't exist |
| 267 | * Choose '''Visual Studio 14 2015''' default native compiler as generator. Set the value of '''Optional toolset to use''' to '''v140_xp''' (to use the XP compatible toolset), then '''Finish''' |
| 268 | * Under '''Ungrouped Entries''', uncheck/turn off `CG`, `CUDA`, `GLEW`, `GLUT`, `JPEG`, `OPENEXR`, `TIFF` |
| 269 | * Under '''ZLIB''', set `ZLIB_INCLUDE_DIR` to `X:\path\to\0ad\libraries\win32\zlib\include`, `ZLIB_LIBRARY_DEBUG`/`RELEASE` to `X:\path\to\0ad\libraries\win32\zlib\lib\zlib1.lib`/`zlib1d.lib` |
| 270 | * Under '''PNG''', set `PNG_PNG_INCLUDE_DIR` to `X:\path\to\0ad\libraries\win32\libpng\include`, `PNG_LIBRARY_DEBUG`/`RELEASE` to `X:\path\to\0ad\libraries\win32\libpng\lib\libpng16.lib`/`libpng16d.lib` |
| 271 | * Change `CMAKE_INSTALL_PREFIX` to `X:\path\to\0ad\libraries\source\nvtt\src\install` |
| 272 | * '''Add Entry''' for `NVTT_SHARED` of Type BOOL and Value checked/turned on |
| 273 | * Press '''Configure''' until there are no errors or red entries (warnings are OK) |
| 274 | * Press '''Generate''' |
| 275 | * Press '''Open project''' |
| 276 | * '''TODO:''' patches for VS 2015 build errors (or update NVTT version, #4549) |
| 277 | * '''TODO:''' configure only nvtt as dynamic (.dll), configure nvcore, nvimage and nvmath as static (.lib) |
| 278 | * Build solution for '''!RelWithDebInfo''' configuration (to generate PDBs) |
| 279 | * Build the '''INSTALL''' project by right-clicking on it (to copy files to the install folders set up earlier) |
| 280 | * `X:\path\to\0ad\libraries\source\nvtt\src\install` should contain all the newly built libs |