-
Notifications
You must be signed in to change notification settings - Fork 133
/
build-lin.sh
executable file
·36 lines (31 loc) · 951 Bytes
/
build-lin.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
#!/bin/bash
MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $MYDIR
# Build and install the cmake static library and headers into a subdirectory
# Specifically: third_party/SDL2-2.0.3/build/linux64/{lib,include}
#
# This really should become an ExternalProject_Add inside the CMakelists.txt
# and windows, linux, and osx should all use the same approach for building cmake.
pushd third_party/SDL2-2.0.8
CMAKE_CMD='cmake
-D ARTS:BOOL=OFF
-D ALSA:BOOL=OFF
-D PULSEAUDIO:BOOL=OFF
-D OSS:BOOL=OFF
-D ESD:BOOL=OFF
-D SDL_SHARED:BOOL=OFF
-D CMAKE_INSTALL_PREFIX="../linux64"
-G "Unix Makefiles"
-D CMAKE_DEBUG_POSTFIX="_debug"
-D SDL_STATIC_PIC:BOOL=ON
'
mkdir -p build/linrelease
pushd build/linrelease
eval $CMAKE_CMD -D CMAKE_BUILD_TYPE="Debug" ../.. || exit 1
make -j install || exit 1
popd
popd
mkdir -p build
cd build
cmake $@ .. || exit 1
make -j || exit 1