diff --git a/.travis.yml b/.travis.yml
index b4b0109aca0251acbb2a1cb14e6078b71a0b79e8..1b3069f0f7d5dd0de1ce03d746c6a7b8c692da33 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,34 +12,80 @@ matrix:
       env: BUILD_TYPE=Debug
       dist: trusty
       compiler: g++
+      addons:
+        apt:
+          packages:
+            - cmake
+            - libboost-all-dev
+            - libassimp-dev
+            - libeigen3-dev
 
     - name: "Xenial - Debug - g++"
       env: BUILD_TYPE=Debug
       dist: xenial
       compiler: g++
+      addons:
+        apt:
+          packages:
+            - cmake
+            - libboost-all-dev
+            - libassimp-dev
+            - libeigen3-dev
+            - liboctomap-dev
     - name: "Xenial - Release - g++"
       env: BUILD_TYPE=Release
       dist: xenial
       compiler: g++
+      addons:
+        apt:
+          packages:
+            - cmake
+            - libboost-all-dev
+            - libassimp-dev
+            - libeigen3-dev
+            - liboctomap-dev
     - name: "Xenial - Debug - clang"
       env: BUILD_TYPE=Debug
       dist: xenial
       compiler: clang
+      addons:
+        apt:
+          packages:
+            - cmake
+            - libboost-all-dev
+            - libassimp-dev
+            - libeigen3-dev
+            - liboctomap-dev
 
     - name: "Bionic - Debug - g++"
       env: BUILD_TYPE=Debug
       dist: xenial
       compiler: g++
+      addons:
+        apt:
+          packages:
+            - cmake
+            - libboost-all-dev
+            - libassimp-dev
+            - libeigen3-dev
+            - liboctomap-dev
 
     - name: "OSX - Debug - clang"
       env: BUILD_TYPE=Debug
       os: osx
       compiler: clang
-
-install:
-  # Install dependencies for FCL
-  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then 'ci/install_linux.sh' ; fi
-  - if [ "$TRAVIS_OS_NAME" = "osx"   ]; then 'ci/install_osx.sh'   ; fi
+      addons:
+        homebrew:
+          taps: homebrew/science
+          update: true
+          packages:
+            - git
+            - cmake
+            - boost
+            - libccd
+            - assimp
+            - eigen
+            - octomap
 
 script:
   # Create build directory
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 676b7e0d67b37a862b6716f57668c9d86f1cf476..145e703686891fc64b11d12d78e95146296a3c3c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,7 +83,7 @@ endif ()
 search_for_boost()
 # Optional dependencies
 add_optional_dependency("octomap >= 1.6")
-if (OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS)
+if (OCTOMAP_FOUND)
   include_directories(SYSTEM ${OCTOMAP_INCLUDE_DIRS})
   link_directories(${OCTOMAP_LIBRARY_DIRS})
   SET(HPP_FCL_HAVE_OCTOMAP TRUE)
diff --git a/ci/install_linux.sh b/ci/install_linux.sh
deleted file mode 100755
index db894789de15500662bb69b03a187bdc8c287af8..0000000000000000000000000000000000000000
--- a/ci/install_linux.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-sudo apt-get -qq update
-
-########################
-# Mendatory dependencies
-########################
-sudo apt-get -qq --yes --force-yes install cmake
-sudo apt-get -qq --yes --force-yes install libboost-all-dev
-sudo apt-get -qq --yes --force-yes install libassimp-dev
-sudo apt-get -qq --yes --force-yes install libeigen3-dev
-
-# Octomap
-git clone https://github.com/OctoMap/octomap
-cd octomap
-git checkout tags/v1.8.0
-mkdir build
-cd build
-cmake ..
-make
-sudo make install
-
diff --git a/ci/install_osx.sh b/ci/install_osx.sh
deleted file mode 100755
index 9f90326aad01b93f0d96bb99646271cd22e9affe..0000000000000000000000000000000000000000
--- a/ci/install_osx.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-brew tap homebrew/science
-
-brew install git
-brew install cmake
-brew install boost
-brew install libccd
-brew install assimp
-brew install eigen
-brew install octomap
diff --git a/test/collision.cpp b/test/collision.cpp
index 2cc491807b305983783b6c6a960aa932c2e9f945..9656f3fe883c29c8cd57467f72a1065f973177cf 100644
--- a/test/collision.cpp
+++ b/test/collision.cpp
@@ -44,6 +44,7 @@
 #include <boost/test/unit_test.hpp>
 #include <boost/utility/binary.hpp>
 
+#include <fstream>
 #include <boost/filesystem.hpp>
 #include <boost/assign/list_of.hpp>