Commit 933d24c8 authored by Patrik Huber's avatar Patrik Huber Committed by GitHub

Merge pull request #105 from gel/master

CMake changes (built in windows and linux):
* Include newest eigen3 CMake file
* Make CMake scripts work with OpenCV 3.1
parents 182dd210 acdb8bfc
......@@ -75,7 +75,7 @@ set(CPACK_PACKAGE_VERSION_PATCH "${eos_VERSION_PATCH}")
include(CPack)
# Find dependencies:
find_package(OpenCV 2.4.3 REQUIRED core)
find_package(OpenCV REQUIRED core)
message(STATUS "OpenCV include dir found at ${OpenCV_INCLUDE_DIRS}")
message(STATUS "OpenCV lib dir found at ${OpenCV_LIB_DIR}")
......
......@@ -9,6 +9,12 @@
# EIGEN3_FOUND - system has eigen lib with correct version
# EIGEN3_INCLUDE_DIR - the eigen include directory
# EIGEN3_VERSION - eigen version
#
# This module reads hints about search locations from
# the following enviroment variables:
#
# EIGEN3_ROOT
# EIGEN3_ROOT_DIR
# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
......@@ -61,12 +67,22 @@ if (EIGEN3_INCLUDE_DIR)
else (EIGEN3_INCLUDE_DIR)
# search first if an Eigen3Config.cmake is available in the system,
# if successful this would set EIGEN3_INCLUDE_DIR and the rest of
# the script will work as usual
find_package(Eigen3 ${Eigen3_FIND_VERSION} NO_MODULE QUIET)
if(NOT EIGEN3_INCLUDE_DIR)
find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
HINTS
ENV EIGEN3_ROOT
ENV EIGEN3_ROOT_DIR
PATHS
${CMAKE_INSTALL_PREFIX}/include
${KDE4_INCLUDE_DIR}
PATH_SUFFIXES eigen3 eigen
)
endif(NOT EIGEN3_INCLUDE_DIR)
if(EIGEN3_INCLUDE_DIR)
_eigen3_check_version()
......
......@@ -10,7 +10,7 @@ if("${OpenCV_VERSION_MAJOR}$" EQUAL 2)
find_package(OpenCV 2.4.3 REQUIRED core imgproc highgui)
elseif("${OpenCV_VERSION_MAJOR}$" EQUAL 3)
message(STATUS "OpenCV 3.x detected - including imgcodecs for compatibility")
find_package(OpenCV 3.0.0 REQUIRED core imgproc imgcodecs)
find_package(OpenCV 3 REQUIRED core imgproc imgcodecs)
endif()
message(STATUS "OpenCV include dir found at ${OpenCV_INCLUDE_DIRS}")
message(STATUS "OpenCV lib dir found at ${OpenCV_LIB_DIR}")
......
......@@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.7.0)
find_package(Matlab COMPONENTS MX_LIBRARY REQUIRED)
# Dependencies of the modules:
find_package(OpenCV 2.4.3 REQUIRED core)
find_package(OpenCV REQUIRED core)
set_target_properties(${OpenCV_LIBS} PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)
if(MSVC)
# The standard find_package for boost on Win finds the dynamic libs, so for dynamic linking to boost we need to #define:
......
......@@ -10,7 +10,7 @@ if("${OpenCV_VERSION_MAJOR}$" EQUAL 2)
find_package(OpenCV 2.4.3 REQUIRED core imgproc highgui)
elseif("${OpenCV_VERSION_MAJOR}$" EQUAL 3)
message(STATUS "OpenCV 3.x detected - including imgcodecs for compatibility")
find_package(OpenCV 3.0.0 REQUIRED core imgproc imgcodecs)
find_package(OpenCV 3 REQUIRED core imgproc imgcodecs)
endif()
message(STATUS "OpenCV include dir found at ${OpenCV_INCLUDE_DIRS}")
message(STATUS "OpenCV lib dir found at ${OpenCV_LIB_DIR}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment