Skip to content

Commit

Permalink
use generic opencv/opencv4 support from base/cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
doudou committed Aug 22, 2020
1 parent 33edb43 commit 7dc72d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
10 changes: 3 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
# CMakeLists.txt has to be located in the project folder and cmake has to be
# executed from 'project/build' with 'cmake ../'.

cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.9)
project(frame_helper
VERSION 1.0
DESCRIPTION "Library for manipulating Rock Core image type")
find_package(Rock)
rock_init()

option(OPENCV4 "Whether OpenCV 4 or later should be used" OFF)
if (OPENCV4)
set(opencv_pkgconfig_suffix 4)
endif()

include(RockAutodetectOpenCV)
rock_autodetect_opencv(OPENCV_PACKAGE)
rock_standard_layout()
set(PROJECT_DESCRIPTION "Library for manipulating frames")
5 changes: 2 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ rock_library(${PROJECT_NAME}
FrameHelper.h
FrameHelperTypes.h
FrameQImageConverter.h
DEPS_PKGCONFIG base-types opencv${opencv_pkgconfig_suffix} jpeg_conversion
DEPS_PLAIN
Boost_REGEX
DEPS_PKGCONFIG base-types ${OPENCV_PACKAGE} jpeg_conversion
DEPS_PLAIN Boost_REGEX
LIBS ${LIBV4l2_LIBRARIES} ${LIBV4l2C_LIBRARIES}
)

0 comments on commit 7dc72d9

Please sign in to comment.