Skip to content

Commit 8a11d3e

Browse files
committed
[skip appveyor] update cmake, dynamic python paths
1 parent c9f9354 commit 8a11d3e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ before_install:
1414
- echo $opencv_version
1515

1616
install:
17+
- sudo add-apt-repository ppa:kalakris/cmake -y
18+
- sudo apt-get update -qq
1719
- sudo apt-get install cmake
1820
- if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then sudo add-apt-repository ppa:fkrull/deadsnakes -y && sudo apt-get update; fi
1921
- if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then sudo apt-get install libpython3.5-dev; fi
@@ -22,8 +24,8 @@ install:
2224
- cd opencv
2325
- mkdir build
2426
- whereis python
25-
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then cmake -H"." -B"build" -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_opencv_python3=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DPYTHON2_EXECUTABLE=${VIRTUAL_ENV}/bin/python -DPYTHON2_LIBRARY=/usr/lib/libpython2.7mu.so -DPYTHON2_INCLUDE_DIR=/usr/include/python2.7m -DPYTHON2_PACKAGES_PATH=${VIRTUAL_ENV}/lib/python2.7/site-packages -Wno-dev; fi
26-
- if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then cmake -H"." -B"build" -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_opencv_python2=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DPYTHON3_EXECUTABLE=${VIRTUAL_ENV}/bin/python -DPYTHON3_LIBRARY=/usr/lib/libpython3.5mu.so -DPYTHON3_INCLUDE_DIR=/usr/include/python3.5m -DPYTHON3_PACKAGES_PATH=${VIRTUAL_ENV}/lib/python3.5/site-packages -Wno-dev; fi
27+
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then cmake -H"." -B"build" -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_opencv_python3=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -Wno-dev; fi
28+
- if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then cmake -H"." -B"build" -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_opencv_python2=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DPYTHON3_EXECUTABLE=$(which python) -DPYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") -DPYTHON3_PACKAGES_PATH=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") -Wno-dev; fi
2729
- cd build
2830
- cmake --build . --config Release
2931
- cd ../..

0 commit comments

Comments
 (0)