CMakeLists.txt 948 B

123456789101112131415161718192021222324252627282930
  1. set(the_description "OGRE 3D Visualiser.")
  2. find_package(OGRE QUIET CONFIG)
  3. if(NOT OGRE_FOUND)
  4. message(STATUS "Module opencv_ovis disabled because OGRE3D was not found")
  5. ocv_module_disable(ovis)
  6. elseif(OGRE_VERSION VERSION_LESS 1.11.5)
  7. message(STATUS "Module opencv_ovis disabled because of incompatible OGRE3D version (${OGRE_VERSION})")
  8. ocv_module_disable(ovis)
  9. else() # we need C++11 for OGRE 1.11
  10. if(MSVC)
  11. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qstd=c++11")
  12. else()
  13. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  14. endif()
  15. endif()
  16. include_directories(${OGRE_INCLUDE_DIRS})
  17. link_directories(${OGRE_LIBRARY_DIRS})
  18. ocv_add_module(ovis opencv_core opencv_imgproc opencv_calib3d WRAP python)
  19. ocv_glob_module_sources()
  20. ocv_module_include_directories()
  21. ocv_create_module()
  22. ocv_add_samples(opencv_aruco)
  23. ocv_warnings_disable(CMAKE_CXX_FLAGS -Wunused-parameter)
  24. ocv_target_link_libraries(${the_module} ${OGRE_LIBRARIES})