Skip to content

Commit f098606

Browse files
committed
[win_build] Update script for static NIX build
- Updates script to build NIX and NIX-MX library and removes copy of obsolete DLL files. - Introduces different HDF5 version to the build.
1 parent cba1289 commit f098606

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

win_build.bat

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ SET NIX_DEP=c:\work\nix-dep
55
REM clone nix source from https://github.com/G-Node/nix
66
SET NIX_ROOT=c:\work\nix
77
SET NIX_MX_ROOT=c:\work\nix-mx
8+
SET HDF5_VERSION_DIR=hdf5-1.10.1
9+
10+
IF NOT EXIST cmake (
11+
ECHO Require a valid installation of cmake.
12+
EXIT /b
13+
)
814

915
IF NOT EXIST %NIX_DEP% (
10-
ECHO Please provide valid nix dependencies.
16+
ECHO Please provide the nix dependency directory.
1117
EXIT /b
1218
)
1319

@@ -40,8 +46,8 @@ SET BASE=%NIX_DEP%\%PLATFORM%\%BUILD_TYPE%
4046
SET CPPUNIT_INCLUDE_DIR=%BASE%\cppunit-1.13.2\include
4147
SET PATH=%PATH%;%CPPUNIT_INCLUDE_DIR%
4248

43-
SET HDF5_BASE=%NIX_DEP%\%PLATFORM%\hdf5-1.8.14
44-
SET HDF5_DIR=%HDF5_BASE%\cmake\hdf5
49+
SET HDF5_BASE=%NIX_DEP%\%PLATFORM%\%HDF5_VERSION_DIR%
50+
SET HDF5_DIR=%HDF5_BASE%\cmake
4551
SET PATH=%PATH%;%HDF5_BASE%\bin
4652

4753
SET BOOST_ROOT=%BASE%\boost-1.57.0
@@ -65,7 +71,7 @@ REM Clean up build folder to ensure clean build.
6571
DEL * /S /Q
6672
RD /S /Q "CMakeFiles" "Testing" "Debug" "Release" "nix-tool.dir" "x64" "TestRunner.dir" "nix.dir"
6773

68-
IF %PROCESSOR_ARCHITECTURE% == x86 ( cmake .. -G "Visual Studio 12") ELSE (cmake .. -G "Visual Studio 12 Win64")
74+
IF %PROCESSOR_ARCHITECTURE% == x86 ( cmake .. -DBUILD_STATIC=ON -G "Visual Studio 12") ELSE (cmake .. -DBUILD_STATIC=ON -G "Visual Studio 12 Win64")
6975

7076
ECHO --------------------------------------------------------------------------
7177
ECHO Building nix via %NIX_ROOT%\build\nix.sln ...
@@ -102,14 +108,6 @@ REM Clean up build folder to ensure clean build.
102108
DEL * /S /Q
103109
RD /S /Q "CMakeFiles" "Debug" "nix_mx.dir" "Release" "Win32" "x64"
104110

105-
REM Copying required libraries to nix-mx root folder
106-
COPY %NIX_BUILD_DIR%\nix.dll %NIX_MX_ROOT%\ /Y
107-
COPY %HDF5_BASE%\bin\hdf5.dll %NIX_MX_ROOT%\ /Y
108-
COPY %HDF5_BASE%\bin\msvcp120.dll %NIX_MX_ROOT%\ /Y
109-
COPY %HDF5_BASE%\bin\msvcr120.dll %NIX_MX_ROOT%\ /Y
110-
COPY %HDF5_BASE%\bin\zlib.dll %NIX_MX_ROOT%\ /Y
111-
COPY %HDF5_BASE%\bin\szip.dll %NIX_MX_ROOT%\ /Y
112-
113111
IF %PROCESSOR_ARCHITECTURE% == x86 (cmake .. -G "Visual Studio 12") ELSE (cmake .. -G "Visual Studio 12 Win64")
114112

115113
ECHO --------------------------------------------------------------------------

0 commit comments

Comments
 (0)