From 02856194a055034fa5801cb0dd4c26691f4c989f Mon Sep 17 00:00:00 2001 From: John Zhao Date: Tue, 4 Sep 2018 15:59:38 +0800 Subject: [PATCH] Update find mynteye in cmakelists of wrappers --- wrappers/python/CMakeLists.txt | 22 ++++++++++--------- .../src/mynt_eye_ros_wrapper/CMakeLists.txt | 4 ++++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/wrappers/python/CMakeLists.txt b/wrappers/python/CMakeLists.txt index 384407d..b6b3ab9 100644 --- a/wrappers/python/CMakeLists.txt +++ b/wrappers/python/CMakeLists.txt @@ -47,14 +47,6 @@ if(OS_MAC) endif() endif() -# options - -include(${PRO_DIR}/cmake/Option.cmake) - -if(NOT WITH_API) - message(FATAL_ERROR "Must with API layer :(") -endif() - # flags if(OS_WIN) @@ -81,6 +73,18 @@ LIST(APPEND CMAKE_PREFIX_PATH ${PRO_DIR}/_install/lib/cmake) find_package(mynteye REQUIRED) message(STATUS "Found mynteye: ${mynteye_VERSION}") +if(NOT mynteye_WITH_API) + message(FATAL_ERROR "Must with API layer :(") +endif() + +include(${PRO_DIR}/cmake/DetectOpenCV.cmake) + +if(mynteye_WITH_GLOG) + include(${PRO_DIR}/cmake/DetectGLog.cmake) +endif() + +## boost & python + if(CMAKE_VERSION VERSION_LESS "3.10" OR CMAKE_VERSION VERSION_EQUAL "3.10") find_package(Boost ${BOOST_FIND_VERSION} REQUIRED COMPONENTS python${PYTHON_BOOST_CODE} # numpy${PYTHON_BOOST_CODE} @@ -99,8 +103,6 @@ message(STATUS "Found PythonLibs: ${PYTHONLIBS_VERSION_STRING}") message(STATUS " PYTHON_INCLUDE_DIRS: ${PYTHON_INCLUDE_DIRS}") message(STATUS " PYTHON_LIBRARIES: ${PYTHON_LIBRARIES}") -include(${PRO_DIR}/cmake/DetectOpenCV.cmake) - #LIST(APPEND CMAKE_MODULE_PATH ${PRO_DIR}/cmake) # targets diff --git a/wrappers/ros/src/mynt_eye_ros_wrapper/CMakeLists.txt b/wrappers/ros/src/mynt_eye_ros_wrapper/CMakeLists.txt index 74a36d1..ae85a88 100644 --- a/wrappers/ros/src/mynt_eye_ros_wrapper/CMakeLists.txt +++ b/wrappers/ros/src/mynt_eye_ros_wrapper/CMakeLists.txt @@ -83,6 +83,10 @@ LIST(APPEND CMAKE_PREFIX_PATH ${SDK_DIR}/_install/lib/cmake) find_package(mynteye REQUIRED) message(STATUS "Found mynteye: ${mynteye_VERSION}") +if(NOT mynteye_WITH_API) + message(FATAL_ERROR "Must with API layer :(") +endif() + include(${SDK_DIR}/cmake/DetectOpenCV.cmake) if(mynteye_WITH_GLOG)