summaryrefslogtreecommitdiffhomepage
path: root/cv/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-04-29 18:34:46 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-04-29 18:34:55 +0200
commitce79d1556bf8d43665694d7dd75571a79d175615 (patch)
treeaf2863d3dd863e1d4ff598f9c9dd70c86bb1bcd3 /cv/CMakeLists.txt
parentf8e54403c3c30bf87491d310afd827a2d7cb7f16 (diff)
cv: gather common init code
Diffstat (limited to 'cv/CMakeLists.txt')
-rw-r--r--cv/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/cv/CMakeLists.txt b/cv/CMakeLists.txt
index 12935f1b..6c693acb 100644
--- a/cv/CMakeLists.txt
+++ b/cv/CMakeLists.txt
@@ -1,7 +1,16 @@
include(opentrack-opencv)
find_package(OpenCV QUIET)
if(OpenCV_FOUND)
+ try_compile(cv_use-ipp "${CMAKE_CURRENT_BINARY_DIR}"
+ SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ocv-check.cxx"
+ CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${OpenCV_INCLUDE_DIRS}"
+ "-DCXX_STANDARD=17" "-DCXX_STANDARD_REQUIRED=1"
+ COMPILE_DEFINITIONS "-D_HAS_EXCEPTIONS=0"
+ OUTPUT_VARIABLE krap)
otr_module(cv STATIC)
target_link_libraries(${self} opencv_videoio opencv_core opentrack-video)
target_include_directories(${self} SYSTEM PRIVATE ${OpenCV_INCLUDE_DIRS})
+ if(cv_use-ipp)
+ target_compile_definitions(${self} PUBLIC -DOTR_HAS_CV_IPP)
+ endif()
endif()