summarylogtreecommitdiffstats
path: root/install.patch
blob: e73f2622353da14011e17cab934af22476c4b4d0 (plain)
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
@@ -30,7 +30,7 @@
 SRCDIR=$1
 OUTDIR=$2
 
-COMMON_OPTIONS="-DGVARS=YES -DHELI=YES -DLUA=YES -Wno-dev -DCMAKE_BUILD_TYPE=Release"
+COMMON_OPTIONS="-DCMAKE_INSTALL_PREFIX=/usr -DGVARS=YES -DHELI=YES -DLUA=YES -Wno-dev -DCMAKE_BUILD_TYPE=Release"
 if [ "$(uname)" = "Darwin" ]; then
     COMMON_OPTIONS="${COMMON_OPTIONS} -DCMAKE_OSX_DEPLOYMENT_TARGET='10.9'"
 elif [ "$(uname)" != "Linux" ]; then # Assume Windows and MSYS2
@@ -59,9 +59,9 @@
   fi
 fi
 
-rm -rf build
-mkdir build
-cd build
+rm -rf ${OUTDIR}
+mkdir ${OUTDIR}
+cd ${OUTDIR}
 
 declare -a simulator_plugins=(x9lite x9lites
                               x7 x7-access
@@ -176,14 +176,4 @@
     cmake --build native -j"${JOBS}" --target libsimulator
 done                              
 
-cmake --build . --target native-configure
-if [ "$(uname)" = "Darwin" ]; then
-    cmake --build native -j"${JOBS}" --target package
-    cp native/*.dmg "${OUTDIR}"
-elif [ "$(uname)" = "Linux" ]; then
-    cmake --build native -j"${JOBS}" --target package
-    cp native/*.AppImage "${OUTDIR}"
-else
-    cmake --build native --target installer
-    cp native/companion/*.exe "${OUTDIR}"
-fi
+cmake ${BUILD_OPTIONS} "${OUTDIR}/native"