fix(complie): 4.x cv error

This commit is contained in:
TinyOh 2019-02-13 11:13:47 +08:00
parent 5d5dc0b7aa
commit f1beee93c1
2 changed files with 4 additions and 15 deletions

View File

@ -130,14 +130,6 @@ endif()
## camodocal
if(WITH_OPENCV4)
message(STATUS "opencv4 calib models not supported")
include_directories(
src/mynteye/api/camodocal/include
)
ADD_DEFINITIONS(-DWITH_CAM_MODELS=OFF)
endif()
if(WITH_CAM_MODELS)
set(EIGEN_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty)
message(STATUS "EIGEN_INCLUDE_DIR: ${EIGEN_INCLUDE_DIR}")
@ -324,12 +316,6 @@ if(NOT WITH_GLOG)
DESTINATION ${MYNTEYE_CMAKE_INCLUDE_DIR}
)
endif()
# if(WITH_CAM_MODELS)
# install(FILES
# ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/glog/logging.h
# DESTINATION ${MYNTEYE_CMAKE_INCLUDE_DIR}/glog
# )
# endif()
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/deprecated/mynteye/callbacks.h

View File

@ -34,9 +34,12 @@ option(WITH_BOOST "Include Boost support" ON)
option(WITH_GLOG "Include glog support" OFF)
# packages
if(WITH_API)
include(${CMAKE_CURRENT_LIST_DIR}/DetectOpenCV.cmake)
set(WITH_OPENCV4 true)
if(WITH_OPENCV4)
set(WITH_CAM_MODELS OFF)
endif()
else()
# Disable WITH_CAM_MODELS if WITH_API is OFF
set(WITH_CAM_MODELS OFF)