@echo off REM The need for this silly little file arises on WIN32 to configure libxml because: REM REM - On WIN32, the configure script MUST be run with the libxml\win32 directory as REM the current directory, so we must CD there before we invoke the command. REM REM - Running multiple commands from inside CMake is not possible REM (can not first CD and then execute). REM REM - Also, all paths MUST use backslashes because they will be passed unquoted REM to mkdir which does not accept forward slashes in paths unless quoted. REM REM When this file runs, the current directory must be set to the libxml source directory. REM REM %1 = Where to install libxml (ie prefix) cd win32 REM Now convert the paths to use backslash and not forward slash REM See http://www.dostips.com/forum/viewtopic.php?f=3&t=422 SETLOCAL EnableDelayedExpansion set prefix=%1 set prefix=!prefix:/=\! REM Now that the paths are Kosher, we can finally do what we came here for: REM Configure libxml REM Note the following: REM REM 1. We must explicitly tell the configure script to install the REM DLLs into the bin subdirectory along with the executables, or those REM DLLs will not be found when we start the executables. This is done with REM the "sodir" parameter. REM REM 2. We must take care to place the include files in the same place REM as the unix configure script does. This is done with the "incdir" REM parameter. cscript configure.js compiler=msvc prefix=%prefix% sodir=%prefix%\bin incdir=%prefix%\include\libxml2 include=%prefix%\include lib=%prefix%\lib debug=yes cruntime=/MDd ENDLOCAL