From 9d8b37663abf10fb1e99e191a3634abd498c4b56 Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Wed, 27 Jun 2018 20:25:04 +0200 Subject: [PATCH] Try being better at finding TBB in OS X. --- .travis.yml | 14 +++----------- CMakeLists.txt | 8 +++++--- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index b034f4a4..e0b69339 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,8 +21,8 @@ before_install: - if [ ${TRAVIS_OS_NAME} = linux ]; then sudo apt-get update; sudo apt-get install libopenblas-dev libopenblas-base; - sudo apt-get install git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev; - sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev checkinstall; + sudo apt-get install git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev; + sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev; sudo apt-get install cmake; sudo apt-get install libboost-all-dev; wget http://dlib.net/files/dlib-19.13.tar.bz2; @@ -68,15 +68,7 @@ before_install: brew update; brew install tbb; brew install openblas; - wget http://dlib.net/files/dlib-19.13.tar.bz2; - tar xf dlib-19.13.tar.bz2; - cd dlib-19.13; - mkdir build; - cd build; - cmake ..; - cmake --build . --config Release; - sudo make install; - cd ../..; + brew install dlib; brew install opencv3; brew upgrade boost; fi diff --git a/CMakeLists.txt b/CMakeLists.txt index 5265133c..a74d1fc1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,12 +40,14 @@ MESSAGE(" Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}") MESSAGE(" Boost_LIBRARIES: ${Boost_LIBRARIES}") MESSAGE(" Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}") - +# Try finding TBB in default location find_package( TBB CONFIG ) -if (NOT ${TBB_FOUND}) + +# If not found, use FindTBB.cmake +if (NOT ${TBB_FOUND} OR NOT ${TBB_LIBRARIES}) find_package( TBB REQUIRED ) else() - MESSAGE("TBB found in CONFIG: ${TBB_DIR}") + MESSAGE("TBB found in CONFIG: ${TBB_LIBRARIES}") endif() MESSAGE("TBB information:")