File: CMakeLists.txt

package info (click to toggle)
opencv 4.10.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 282,092 kB
  • sloc: cpp: 1,178,079; xml: 682,621; python: 49,092; lisp: 31,150; java: 25,469; ansic: 11,039; javascript: 6,085; sh: 1,214; cs: 601; perl: 494; objc: 210; makefile: 173
file content (54 lines) | stat: -rw-r--r-- 1,496 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
set(BUILD_opencv_cnn_3dobj_INIT OFF)  # Must be disabled by default - requires custom build of Caffe.
if(NOT BUILD_opencv_cnn_3dobj)
  return()
endif()

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})

find_package(Caffe)
if(Caffe_FOUND)
  message(STATUS "Caffe:   YES")
  set(HAVE_CAFFE 1)
else()
  message(STATUS "Caffe:   NO")
endif()

if(NOT BUILD_PROTOBUF)
  find_package(Protobuf)
endif()
if(Protobuf_FOUND)
  message(STATUS "Protobuf:   YES")
  set(HAVE_PROTOBUF 1)
else()
  message(STATUS "Protobuf:   NO")
endif()

find_package(Glog)
if(Glog_FOUND)
  message(STATUS "Glog:   YES")
  set(HAVE_GLOG 1)
else()
  message(STATUS "Glog:   NO")
endif()

if(NOT HAVE_CAFFE)
    ocv_module_disable(cnn_3dobj)
else()

include_directories(${CMAKE_CURRENT_BINARY_DIR})

include_directories(${Caffe_INCLUDE_DIR})
set(the_description "CNN for 3D object recognition and pose estimation including a completed Sphere View on 3D objects")
ocv_define_module(cnn_3dobj opencv_core opencv_imgproc ${Caffe_LIBS} ${Glog_LIBS} ${Protobuf_LIBS} OPTIONAL opencv_features2d opencv_viz opencv_calib3d WRAP python)
ocv_add_testdata(testdata/cv contrib/cnn_3dobj)

if(TARGET opencv_test_cnn_3dobj)
  target_link_libraries(opencv_test_cnn_3dobj PUBLIC boost_system)
endif()

foreach(exe_TGT  classify video sphereview_data model_analysis)
    if(TARGET example_cnn_3dobj_${exe_TGT})
      target_link_libraries(example_cnn_3dobj_${exe_TGT} PUBLIC boost_system)
    endif()
endforeach()
endif()