Changes between Version 5 and Version 6 of BuildingWindowsDependencies
- Timestamp:
- Jul 5, 2017, 10:38:21 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildingWindowsDependencies
v5 v6 161 161 == libpng == 162 162 163 '''Note:''' Depends on zlib, so if you're building it too, do that first. 163 '''Note:''' Depends on zlib, so if you're building it too, do that first. Note down the `install` path where CMake installed the zlib build output. 164 164 165 165 * CMake GUI-based build: 166 166 * [http://www.libpng.org/pub/png/libpng.html Download libpng] source .zip and extract somewhere (`X:\path\to\lpng1xxx`) 167 * Open cmake-gui (v3. 2in this example)167 * Open cmake-gui (v3.8 in this example) 168 168 * Set source location to the `X:\path\to\lpng1xxx` 169 169 * Set build location to `X:\path\to\lpng1xxx\build` (so the build files will be separate from the source) 170 170 * Press '''Configure''' 171 171 * Choose '''Yes''' to create the build directory if it doesn't exist 172 * Choose '''Visual Studio 12 2013''' default native compiler as generator , then Finish172 * Choose '''Visual Studio 12 2013''' default native compiler as generator. Set the value of '''Optional toolset to use''' to '''v120_xp''' (to use the XP compatible toolset), then Finish 173 173 * There should be an error because it can't find zlib yet 174 * Set `ZLIB_INCLUDE_DIR` to the path to the zlib headers (in SVN, that is `libraries\win32\zlib\include`) 175 * Set `ZLIB_LIBRARY` to the path to the zlib static lib (in SVN, that is `libraries\win32\zlib\lib\zlib1.lib`) 176 * '''Note:''' this is only for the release build, we'll fix that later 177 * Add Entry, `CMAKE_GENERATOR_TOOLSET` as a String, and set the value to '''v120_xp''' (to use the XP compatible toolset) 178 * Change `CMAKE_INSTALL_PREFIX` to `X:\path\to\lpng1xxx\install` 174 * Set `ZLIB_ROOT` to the install path of the zlib build output 175 * Change `CMAKE_INSTALL_PREFIX` to `X:\path\to\lpng1xxx\installdir` (`install` is not possible because of the existing `INSTALL` file) 179 176 * Press '''Configure''' until there are no errors or red entries 180 177 * Press '''Generate''' 181 * In `lpng1xxx\build`, there should be a `libpng.sln` solution you can open in Visual Studio 2013. Open it182 * Open '''png1x''' project properties, select '''Debug''' configuration. Under '''Configuration Properties > Linker > Input > Additional Dependencies''', add a "d" onto the end of the zlib.lib filename (so it uses the zlib debug build in this case)183 * Optional DLL version info: add `lpng1xxx\scripts\pngwin.rc` as a source file in the png1x project178 * Press '''Open project''' 179 * Open `png` project properties, select '''Debug''' configuration. Under '''Configuration Properties > Linker > Input > Additional Dependencies''', add a "d" onto the end of the zlib1 .lib filename (so it uses the zlib debug build in this case) 180 * Optional DLL version info: Right-click on the `png` project, click '''Add > Existing element''' and select `lpng1xxx\scripts\pngwin.rc` 184 181 * Build solution for '''Debug''' configuration, there should be no errors. Build the INSTALL project to copy files to the install folders set up earlier 185 182 * Repeat for '''Release''' configuration 186 * `lpng1xxx\install ` should contain the newly built libs183 * `lpng1xxx\installdir` should contain the newly built libs 187 184 188 185 == libxml2 == … … 268 265 * Repeat for '''Release''' configuration 269 266 * `zlib-x.x.x\install` should contain all the newly built libs 270 * Rename the static libs to add the `1` to the file names. 267 * Rename the static libs to add the `1` to the file names. The name of the debug DLL must stay `zlibd1.dll`.