mirror of
https://git.freebsd.org/ports.git
synced 2025-05-28 17:06:32 -04:00
- Revert options helpers to if statements since the OFF condition is not applied when OPTIONS_EXCLUDE is used - Move most of the OpenCV modules from the graphics/opencv-core port to graphics/opencv, leaving opencv-core as just the bare minimum required for building ffmpeg with OpenCV support - Install examples for python and java bindings - Add new slave port graphics/opencv-java: Java bindings for OpenCV - Bump PORTREVISION and make dependency adjustments and fixes for dependent ports - Add UPDATING entry
38 lines
1.3 KiB
CMake
38 lines
1.3 KiB
CMake
# Module for finding the core components of OpenCV installed by
|
|
# graphics/opencv-core. Use for projects that require only
|
|
# opencv_core or opencv_imgproc. Others should use the
|
|
# standard OpenCV CMake find routines provided by graphics/opencv.
|
|
#
|
|
# This module provides:
|
|
# OPENCVCORE_FOUND - defined if the required OpenCV components are found
|
|
# OpenCV_INCLUDE_DIRS - the path to the OpenCV headers
|
|
# OpenCV_LIBS - the OpenCV libraries to link to
|
|
# OpenCV_VERSION - the version of OpenCV
|
|
#
|
|
# Example usage: find_package( OpenCVCore COMPONENTS core imgproc REQUIRED )
|
|
|
|
include( FindPackageHandleStandardArgs )
|
|
|
|
set( OpenCV_VERSION %%OCV_VERSION%% )
|
|
|
|
find_path( OpenCV_INCLUDE_DIRS NAMES opencv2/core/core.hpp )
|
|
|
|
if( OpenCVCore_FIND_COMPONENTS )
|
|
foreach( component ${OpenCVCore_FIND_COMPONENTS} )
|
|
string( TOUPPER ${component} _COMPONENT )
|
|
set( OPENCV_USE_${_COMPONENT} 1 )
|
|
endforeach()
|
|
endif()
|
|
|
|
# opencv_core is always required
|
|
find_library( OPENCV_CORE_LIBRARY NAMES opencv_core )
|
|
|
|
if( OPENCV_USE_IMGPROC OR NOT OpenCVCore_FIND_COMPONENTS )
|
|
find_library( OPENCV_IMGPROC_LIBRARY NAMES opencv_imgproc )
|
|
endif()
|
|
|
|
set( OpenCV_LIBS ${OPENCV_CORE_LIBRARY} ${OPENCV_IMGPROC_LIBRARY} )
|
|
|
|
find_package_handle_standard_args( OpenCVCore DEFAULT_MSG OpenCV_LIBS OpenCV_INCLUDE_DIRS )
|
|
|
|
mark_as_advanced( ${OpenCV_LIBS} ${OpenCV_INCLUDE_DIRS} ${OpenCV_VERSION} )
|