@@ -7,39 +7,46 @@ environment:
7
7
8
8
# VS 2015
9
9
- platform : x86
10
- VS_VERSION : Visual Studio 14
11
10
APPVEYOR_BUILD_WORKER_IMAGE : Visual Studio 2015
12
11
BUILD_SHARED_LIBS : OFF
13
12
14
13
# VS 2017
15
14
- platform : x64
16
- VS_VERSION : Visual Studio 15
17
15
APPVEYOR_BUILD_WORKER_IMAGE : Visual Studio 2017
18
16
BUILD_SHARED_LIBS : ON
19
17
20
18
shallow_clone : true
21
19
20
+ cache :
21
+ - C:\Tools\vcpkg\installed\ -> appveyor.yml
22
+
22
23
build_script :
23
- - echo build_script
24
- - git clone https://github.com/microsoft/vcpkg
25
- - cd vcpkg
26
- - bootstrap-vcpkg.bat
27
- - set PATH=%CD%;%PATH%
28
- - cd ..
29
- - vcpkg install sqlite3[core,tool]:"%platform%"-windows
30
- - vcpkg install tiff:"%platform%"-windows
31
- - vcpkg install curl:"%platform%"-windows
32
- - if "%platform%" == "x64" SET VS_FULL=%VS_VERSION% Win64
33
- - if "%platform%" == "x86" SET VS_FULL=%VS_VERSION%
34
- - echo "%VS_FULL%"
24
+ - set VCPKG_INSTALLED=C:\Tools\vcpkg\installed\%platform%-windows
25
+ # If cached directory does not exist, update vcpkg and install dependencies
26
+ - if not exist %VCPKG_INSTALLED%\bin (
27
+ cd "C:\Tools\vcpkg" &
28
+ git pull > nul &
29
+ .\bootstrap-vcpkg.bat -disableMetrics &
30
+ vcpkg install sqlite3[core,tool]:"%platform%"-windows &
31
+ vcpkg install tiff:"%platform%"-windows &
32
+ vcpkg install curl:"%platform%"-windows &
33
+ cd %APPVEYOR_BUILD_FOLDER%
34
+ )
35
+ - dir %VCPKG_INSTALLED%\bin
36
+ - set PATH=%VCPKG_INSTALLED%\bin;%PATH%
37
+ # See https://www.appveyor.com/docs/lang/cpp/
38
+ - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" if %platform%==x86
39
+ (call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86)
40
+ - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017"
41
+ (call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %platform% )
35
42
#
36
43
- set PROJ_BUILD=%APPVEYOR_BUILD_FOLDER%\build
37
44
- mkdir %PROJ_BUILD%
38
45
- cd %PROJ_BUILD%
39
46
- set PROJ_DIR=%APPVEYOR_BUILD_FOLDER%\proj_dir
40
- - cmake -G "%VS_FULL%" .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS="%BUILD_SHARED_LIBS%" -DCMAKE_C_FLAGS="/WX" -DCMAKE_CXX_FLAGS="/WX" -DCMAKE_TOOLCHAIN_FILE=C:/projects/proj /vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX="%PROJ_DIR%"
41
- - cmake --build . --config Release --target install
42
- - copy c:\projects\proj\vcpkg\installed\"%platform%"-windows\bin\*.dll %PROJ_DIR%\bin
47
+ - cmake -GNinja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS="%BUILD_SHARED_LIBS%" -DCMAKE_C_FLAGS="/WX" -DCMAKE_CXX_FLAGS="/WX" -DCMAKE_TOOLCHAIN_FILE=c:/tools /vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX="%PROJ_DIR%"
48
+ - ninja -v
49
+ - ninja install
43
50
- dir %PROJ_DIR%\bin
44
51
45
52
test_script :
0 commit comments