Skip to content

Commit fe724c6

Browse files
committed
Replace make.bat with make_vcpkg.bat
1 parent 074d364 commit fe724c6

File tree

3 files changed

+16
-151
lines changed

3 files changed

+16
-151
lines changed

.vscode/tasks.json

Lines changed: 3 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"label": "vcpkg-x64-windows-release",
88
"type": "shell",
99
"windows": {
10-
"command": "${workspaceFolder}\\make_vcpkg.bat"
10+
"command": "${workspaceFolder}\\make.bat"
1111
},
1212
"options": {
1313
"env": {
@@ -27,13 +27,13 @@
2727
},
2828
"problemMatcher": [
2929
"$msCompile"
30-
]
30+
]
3131
},
3232
{
3333
"label": "vcpkg-x64-windows-debug",
3434
"type": "shell",
3535
"windows": {
36-
"command": "${workspaceFolder}\\make_vcpkg.bat"
36+
"command": "${workspaceFolder}\\make.bat"
3737
},
3838
"options": {
3939
"env": {
@@ -51,110 +51,6 @@
5151
"reveal": "always",
5252
"panel": "new"
5353
},
54-
"problemMatcher": [
55-
"$msCompile"
56-
]
57-
},
58-
{
59-
"label": "pdalc-vc15-release",
60-
"type": "shell",
61-
"windows": {
62-
"command": "${workspaceFolder}\\make.bat"
63-
},
64-
"options": {
65-
"env": {
66-
"BUILD_TYPE": "Release",
67-
"COMPILER_ID": "vc.15",
68-
"OSGEO4W_ROOT": "C:\\OSGeo4W64",
69-
"GENERATOR": "Visual Studio 15 2017 Win64",
70-
}
71-
},
72-
"group": {
73-
"kind": "build",
74-
"isDefault": true
75-
},
76-
"presentation": {
77-
"reveal": "always",
78-
"panel": "new"
79-
},
80-
"problemMatcher": [
81-
"$msCompile"
82-
]
83-
},
84-
{
85-
"label": "pdalc-vc15-debug",
86-
"type": "shell",
87-
"windows": {
88-
"command": "${workspaceFolder}\\make.bat"
89-
},
90-
"options": {
91-
"env": {
92-
"BUILD_TYPE": "Debug",
93-
"COMPILER_ID": "vc.15",
94-
"OSGEO4W_ROOT": "C:\\OSGeo4W64",
95-
"GENERATOR": "Visual Studio 15 2017 Win64",
96-
}
97-
},
98-
"group": {
99-
"kind": "build",
100-
"isDefault": true
101-
},
102-
"presentation": {
103-
"reveal": "always",
104-
"panel": "new"
105-
},
106-
"problemMatcher": [
107-
"$msCompile"
108-
]
109-
},
110-
{
111-
"label": "pdalc-vc14-release",
112-
"type": "shell",
113-
"windows": {
114-
"command": "${workspaceFolder}\\make.bat"
115-
},
116-
"options": {
117-
"env": {
118-
"BUILD_TYPE": "Release",
119-
"COMPILER_ID": "vc.14",
120-
"OSGEO4W_ROOT": "C:\\OSGeo4W64",
121-
"GENERATOR": "Visual Studio 14 2015 Win64",
122-
}
123-
},
124-
"group": {
125-
"kind": "build",
126-
"isDefault": true
127-
},
128-
"presentation": {
129-
"reveal": "always",
130-
"panel": "new"
131-
},
132-
"problemMatcher": [
133-
"$msCompile"
134-
]
135-
},
136-
{
137-
"label": "pdalc-vc14-debug",
138-
"type": "shell",
139-
"windows": {
140-
"command": "${workspaceFolder}\\make.bat"
141-
},
142-
"options": {
143-
"env": {
144-
"BUILD_TYPE": "Debug",
145-
"COMPILER_ID": "vc.14",
146-
"OSGEO4W_ROOT": "C:\\OSGeo4W64",
147-
"GENERATOR": "Visual Studio 14 2015 Win64",
148-
}
149-
},
150-
"group": {
151-
"kind": "build",
152-
"isDefault": true
153-
},
154-
"presentation": {
155-
"reveal": "always",
156-
"panel": "new"
157-
},
15854
"problemMatcher": [
15955
"$msCompile"
16056
]

make.bat

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,29 @@
33
:: This script assumes that cmake is in PATH
44
:: TODO Auto-detect latest platform
55
set SCRIPT_DIR=%~dp0
6-
if not defined GENERATOR set GENERATOR=Visual Studio 15 2017 Win64
7-
if not defined COMPILER_ID set COMPILER_ID=vc.15
6+
7+
::cmake .. "-DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake" -G "Sublime Text 2 - Ninja" -DVCPKG_TARGET_TRIPLET=x86-windows-static -DCMAKE_BUILD_TYPE=Debug
8+
9+
if not defined TOOLCHAIN set TOOLCHAIN=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake
810
if not defined BUILD_TYPE set BUILD_TYPE=Release
11+
if not defined ARCH set ARCH=x64
12+
if not defined TARGET_OS set TARGET_OS=windows
913

10-
set BUILD_DIR=%SCRIPT_DIR%\build\windows.amd64.%COMPILER_ID%
14+
set TRIPLET=%ARCH%-%TARGET_OS%
15+
16+
set BUILD_DIR=%SCRIPT_DIR%\build\%TRIPLET%
1117

1218
if exist "%BUILD_DIR%\pdal-c.sln" (
1319
pushd "%BUILD_DIR%"
1420
) else (
1521
mkdir "%BUILD_DIR%"
1622
pushd "%BUILD_DIR%"
1723

18-
mkdir install
19-
20-
cmake -G "%GENERATOR%" ^
24+
cmake ../.. ^
2125
-DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^
22-
-DCMAKE_PREFIX_PATH=%OSGEO4W_ROOT% ^
23-
-DCMAKE_INSTALL_PREFIX=./install ^
24-
../..
26+
-DCMAKE_TOOLCHAIN_FILE=%TOOLCHAIN% ^
27+
-DVCPKG_TARGET_TRIPLET=%TRIPLET% ^
28+
-DCMAKE_GENERATOR_PLATFORM=%ARCH%
2529
)
2630

2731
:: Build and install solution

make_vcpkg.bat

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)