Use CMake 3.2. (#1332)
parent
f61a944938
commit
926b8540f6
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12) # Ships with Ubuntu 14.04 (Trusty)
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(cartographer)
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
# Copyright 2018 The Cartographer Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
find_package(Eigen3 QUIET NO_MODULE)
|
||||
if (NOT EIGEN3_FOUND)
|
||||
list(APPEND EIGEN3_POSSIBLE_DIRS
|
||||
/usr/local/include/eigen3
|
||||
/usr/include/eigen3
|
||||
)
|
||||
find_path(EIGEN3_INCLUDE_DIR
|
||||
NAMES Eigen/Core
|
||||
PATHS ${EIGEN3_POSSIBLE_DIRS}
|
||||
)
|
||||
if (EIGEN3_INCLUDE_DIR AND EXISTS ${EIGEN3_INCLUDE_DIR})
|
||||
set(EIGEN3_FOUND TRUE)
|
||||
else()
|
||||
message(WARNING "Failed to find Eigen3. Please, define the path manually.")
|
||||
endif()
|
||||
endif()
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2016 The Cartographer Authors
|
||||
#
|
||||
|
@ -19,8 +19,22 @@ set -o verbose
|
|||
|
||||
# Install the required libraries that are available as debs.
|
||||
sudo apt-get update
|
||||
|
||||
# Install CMake 3.2 for Ubuntu Trusty and Debian Jessie.
|
||||
sudo apt-get install lsb-release -y
|
||||
if [[ "$(lsb_release -sc)" = "trusty" ]]
|
||||
then
|
||||
sudo apt-get install cmake3 -y
|
||||
elif [[ "$(lsb_release -sc)" = "jessie" ]]
|
||||
then
|
||||
sudo sh -c "echo 'deb http://ftp.debian.org/debian jessie-backports main' >> /etc/apt/sources.list"
|
||||
sudo apt-get update
|
||||
sudo apt-get -t jessie-backports install cmake -y
|
||||
else
|
||||
sudo apt-get install cmake -y
|
||||
fi
|
||||
|
||||
sudo apt-get install -y \
|
||||
cmake \
|
||||
g++ \
|
||||
git \
|
||||
google-mock \
|
||||
|
|
Loading…
Reference in New Issue