Skip to content

Commit e441544

Browse files
committed
motify .travis.yml
1 parent f0543f5 commit e441544

File tree

1 file changed

+29
-11
lines changed

1 file changed

+29
-11
lines changed

.travis.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,38 @@ notifications:
1818
before_install:
1919
- sudo apt-get update
2020
install:
21-
- sudo apt-get install build-essential
22-
- sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
21+
# OpenCV dependencies - Details available at: http://docs.opencv.org/trunk/doc/tutorials/introduction/linux_install/linux_install.html
22+
- sudo apt-get install -y build-essential
23+
- sudo apt-get install -y cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
24+
- sudo apt-get install -y python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
25+
26+
# Download v3.0.0 .zip file and extract.
27+
- curl -sL https://github.com/Itseez/opencv/archive/3.2.0.zip > opencv.zip
28+
- unzip opencv.zip
29+
- cd opencv-3.2.0
30+
31+
# Create a new 'build' folder.
32+
- mkdir build
33+
- cd build
34+
35+
# Set build instructions for Ubuntu distro.
36+
- cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
37+
# Run 'make' with four threads.
38+
- make -j4
39+
40+
# Install to OS.
41+
- sudo make install
42+
# Add configuration to OpenCV to tell it where the library files are located on the file system (/usr/local/lib)
43+
- sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
44+
45+
- sudo ldconfig
46+
- echo "OpenCV installed."
47+
48+
# We need to return to the repo "root" folder, so we can then 'cd' into the C++ project folder.
49+
- cd ../../
2350

2451
#Compile
2552
before_script:
26-
- git clone https://github.com/opencv/opencv.git
27-
- cd opencv
28-
- git checkout 3.2.0
29-
- mkdir build
30-
- cd build
31-
- cmake ..
32-
- make
33-
- make install
34-
- cd ..
3553
- ./travis/compile.sh
3654

3755
script:

0 commit comments

Comments
 (0)