-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_config.sh
executable file
·53 lines (45 loc) · 2.16 KB
/
build_config.sh
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
depFolder="deps"
debugFolder="build-debug"
coverageFolder="build-debug-coverage"
releaseFolder="build-release"
if [ -d "$depFolder" ]; then
rm -rf "build"
fi
cmake -B build-debug \
-S . \
-D CMAKE_TOOLCHAIN_FILE="$depFolder/vcpkg/scripts/buildsystems/vcpkg.cmake" \
-D glfw3_DIR="$depFolder/glfw/lib/cmake/glfw3" \
-D glbinding_DIR="$depFolder/glbinding" \
-D magic_enum_DIR="$depFolder/magic_enum/lib/cmake/magic_enum" \
-D yaml-cpp_DIR="$depFolder/yaml-cpp/lib/cmake/yaml-cpp" \
-G "Unix Makefiles"
cmake -B build-debug-coverage \
-S . \
-D CMAKE_CXX_FLAGS=--coverage \
-D CMAKE_C_FLAGS=--coverage \
-D CMAKE_TOOLCHAIN_FILE="$depFolder/vcpkg/scripts/buildsystems/vcpkg.cmake" \
-D glfw3_DIR="$depFolder/glfw/lib/cmake/glfw3" \
-D glbinding_DIR="$depFolder/glbinding" \
-D magic_enum_DIR="$depFolder/magic_enum/lib/cmake/magic_enum" \
-D yaml-cpp_DIR="$depFolder/yaml-cpp/lib/cmake/yaml-cpp" \
-G "Unix Makefiles"
cmake -B build-release \
-S . \
-D CMAKE_TOOLCHAIN_FILE="$depFolder/vcpkg/scripts/buildsystems/vcpkg.cmake" \
-D glfw3_DIR="$depFolder/glfw/lib/cmake/glfw3" \
-D glbinding_DIR="$depFolder/glbinding" \
-D magic_enum_DIR="$depFolder/magic_enum/lib/cmake/magic_enum" \
-D yaml-cpp_DIR="$depFolder/yaml-cpp/lib/cmake/yaml-cpp" \
-G "Unix Makefiles"
mkdir "$debugFolder"
mkdir "$coverageFolder"
mkdir "$releaseFolder"
cp "$depFolder/glfw/lib/libglfw.so" "$debugFolder"
cp "$depFolder/glfw/lib/libglfw.so" "$coverageFolder"
cp "$depFolder/glfw/lib/libglfw.so" "$releaseFolder"
cp "$depFolder/glbinding/lib/libglbindingd.so" "$depFolder/glbinding/lib/libglbinding-auxd.so" -t "$debugFolder"
cp "$depFolder/glbinding/lib/libglbindingd.so" "$depFolder/glbinding/lib/libglbinding-auxd.so" -t "$coverageFolder"
cp "$depFolder/glbinding/lib/libglbinding.so" "$depFolder/glbinding/lib/libglbinding-aux.so" -t "$releaseFolder"
cp "$depFolder/yaml-cpp/lib/libyaml-cppd.so" "$debugFolder"
cp "$depFolder/yaml-cpp/lib/libyaml-cppd.so" "$coverageFolder"
cp "$depFolder/yaml-cpp/lib/libyaml-cpp.so" "$releaseFolder"