forked from acristoffers/CEF3SimpleSample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-linux.sh
executable file
·44 lines (38 loc) · 1.15 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 CEF3SimpleSample::Independente"
g++ -c ../CEF3SimpleSample/Independente/*.cpp \
-I ../CEF3SimpleSample/Independente \
-I ../CEF3SimpleSample/CEF/Linux \
-I ../CEF3SimpleSample/CEF/Linux/include \
`pkg-config --cflags --libs gtk+-2.0`
echo "Building CEF3SimpleSample::Linux"
g++ -c ../CEF3SimpleSample/Linux/*.cpp \
-I ../CEF3SimpleSample/Independente \
-I ../CEF3SimpleSample/CEF/Linux \
-I ../CEF3SimpleSample/CEF/Linux/include \
`pkg-config --cflags --libs gtk+-2.0`
echo "Linking..."
g++ *.o \
-o CEF3SimpleSample \
`pkg-config --cflags --libs gtk+-2.0` \
-L ../CEF3SimpleSample/CEF/Linux/lib \
-ldl \
-lcef_dll_wrapper \
-lcef \
-Wl,-R. -Wl,-R/usr/lib
echo "Copying files around..."
rm *.o
mkdir bin
mv CEF3SimpleSample bin/
cp -r ../CEF3SimpleSample/CEF/Linux/Resources/* bin/
cp -r ../CEF3SimpleSample/CEF/Linux/lib/*.so bin/
cp -r ../CEF3SimpleSample/Independente/html bin/html
mv bin ..
cd ..
rm -r build