-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_with_cmake_vcpkg.ps1
executable file
·88 lines (77 loc) · 1.74 KB
/
build_with_cmake_vcpkg.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/env powershell
$GENERATE_PRESET = "ninja-multi-vcpkg"
$BUILD_PRESET = "ninja-vcpkg-release"
$TEST_PRESET = "test-release"
$PACKAGE_PRESET_ZIP = "package-zip-release"
#$PACKAGE_PRESET_TGZ = "package-tar-gz-release"
#$PACKAGE_PRESET_DEB = "package-deb-release"
#$PACKAGE_PRESET_RPM = "package-rpm-release"
$PACKAGE_PRESET_NSIS64 = "package-nsis64-release"
$WORKFLOW_PRESET ="workflow-ninja-vcpkg-windows"
if ( $WORKFLOW_PRESET ) {
echo "#####"
echo "# Calling CMake workflow: $WORKFLOW_PRESET"
echo "#####"
cmake --workflow --preset "$WORKFLOW_PRESET"
exit
}
if ( $GENERATE_PRESET ) {
echo "#####"
echo "# Creating CMake build files"
echo "#####"
cmake --preset $GENERATE_PRESET
}
if ( !$? ) {
exit
} elseif ( $BUILD_PRESET ) {
echo ""
echo "#####"
echo "# Building TestNosoCPP"
echo "#####"
cmake --build --preset $BUILD_PRESET
}
if ( !$? ) {
exit
} elseif ( $PACKAGE_PRESET_ZIP ) {
echo ""
echo "#####"
echo "# Packaging NosoCpp *.zip"
echo "#####"
cpack --preset $PACKAGE_PRESET_ZIP
}
if ( !$? ) {
exit
} elseif ( $PACKAGE_PRESET_TGZ ) {
echo ""
echo "#####"
echo "# Packaging NosoCpp *.tar.gz"
echo "#####"
cpack --preset $PACKAGE_PRESET_TGZ
}
if ( !$? ) {
exit
} elseif ( $PACKAGE_PRESET_DEB ) {
echo ""
echo "#####"
echo "# Packaging NosoCpp *.deb"
echo "#####"
cpack --preset $PACKAGE_PRESET_DEB
}
if ( !$? ) {
exit
} elseif ( $PACKAGE_PRESET_RPM ) {
echo ""
echo "#####"
echo "# Packaging NosoCpp *.rpm"
echo "#####"
cpack --preset $PACKAGE_PRESET_RPM
}
if ( !$? ) {
exit
} elseif ( $PACKAGE_PRESET_NSIS64 ) {
echo ""
echo "#####"
echo "# Packaging NosoCpp install.exe"
echo "#####"
cpack --preset $PACKAGE_PRESET_NSIS64
}