forked from acristoffers/CEFSimpleSample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-linux.sh
executable file
·44 lines (38 loc) · 1.17 KB
/
build-linux.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
#!/usr/bin/env bash
mkdir -p bin # for silencing the next line, in case the folder does not exist
rm -r bin
mkdir -p build
touch build/touched # for silencing the next line, in case the folder was just created
rm -r build/*
cd build
echo "Building CEFSimpleSample::Independent"
g++ -c ../CEFSimpleSample/Independent/*.cpp \
-I ../CEFSimpleSample/Independent \
-I ../CEFSimpleSample/CEF/Linux \
-I ../CEFSimpleSample/CEF/Linux/include \
`pkg-config --cflags --libs gtk+-2.0`
echo "Building CEFSimpleSample::Linux"
g++ -c ../CEFSimpleSample/Linux/*.cpp \
-I ../CEFSimpleSample/Independent \
-I ../CEFSimpleSample/CEF/Linux \
-I ../CEFSimpleSample/CEF/Linux/include \
`pkg-config --cflags --libs gtk+-2.0`
echo "Linking..."
g++ *.o \
../CEFSimpleSample/CEF/Linux/lib/libcef_dll_wrapper.a \
-o CEFSimpleSample \
`pkg-config --cflags --libs gtk+-2.0` \
-L ../CEFSimpleSample/CEF/Linux/lib \
-ldl \
-lcef \
-Wl,-R. -Wl,-R/usr/lib
echo "Copying files around..."
rm *.o
mkdir bin
mv CEFSimpleSample bin/
cp -r ../CEFSimpleSample/CEF/Linux/resources/* bin/
cp -r ../CEFSimpleSample/CEF/Linux/lib/*.so bin/
cp -r ../CEFSimpleSample/Independent/html bin/
mv bin ..
cd ..
rm -r build