summaryrefslogtreecommitdiffhomepage
path: root/cv/CMakeLists.txt
blob: 3a8798ccc57d2c60d5060e27f2f063afd716115a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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=20" "-DCXX_STANDARD_REQUIRED=1"
                OUTPUT_VARIABLE krap)
    otr_module(cv STATIC)
    target_link_libraries(${self} 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()