Skip to content

Commit

Permalink
Add OpenCV 4.x compatibility to CMakeLists.txt of examples (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
kanonet authored and patrikhuber committed Jul 19, 2019
1 parent 074e6ba commit 13f3add
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ if("${OpenCV_VERSION_MAJOR}$" EQUAL 2)
elseif("${OpenCV_VERSION_MAJOR}$" EQUAL 3)
message(STATUS "OpenCV 3.x detected - including imgcodecs for compatibility")
find_package(OpenCV 3 REQUIRED core imgproc imgcodecs)
elseif("${OpenCV_VERSION_MAJOR}$" EQUAL 4)
message(STATUS "OpenCV 4.x detected - including imgcodecs for compatibility")
find_package(OpenCV 4 REQUIRED core imgproc imgcodecs)
endif()
# This allows us to compile in RelWithDebInfo. It'll use the Release-version of OpenCV:
set_target_properties(${OpenCV_LIBS} PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)
Expand Down

0 comments on commit 13f3add

Please sign in to comment.