Update CMakeLists.txt
authorSuleyman TURKMEN <sturkmen@hotmail.com>
Mon, 26 Apr 2021 15:36:51 +0000 (18:36 +0300)
committerSuleyman TURKMEN <sturkmen@hotmail.com>
Mon, 26 Apr 2021 19:43:04 +0000 (22:43 +0300)
modules/dnn/CMakeLists.txt

index bc1f9ada851ded7b512c191c21d7954ea1406b7a..2e97b88663514c32015f99b837c74e9dfc7f35f9 100644 (file)
@@ -148,16 +148,20 @@ ocv_add_perf_tests(${INF_ENGINE_TARGET}
     FILES Include ${perf_hdrs}
 )
 
-ocv_option(${the_module}_PERF_CAFFE "Add performance tests of Caffe framework" OFF)
-ocv_option(${the_module}_PERF_CLCAFFE "Add performance tests of clCaffe framework" OFF)
+ocv_option(OPENCV_DNN_PERF_CAFFE "Add performance tests of Caffe framework" OFF)
+ocv_option(OPENCV_DNN_PERF_CLCAFFE "Add performance tests of clCaffe framework" OFF)
 if(BUILD_PERF_TESTS)
-  if (${the_module}_PERF_CAFFE)
+  if (OPENCV_DNN_PERF_CAFFE
+      OR ${the_module}_PERF_CAFFE  # compatibility for deprecated option
+  )
     find_package(Caffe QUIET)
     if (Caffe_FOUND)
       add_definitions(-DHAVE_CAFFE=1)
       ocv_target_link_libraries(opencv_perf_dnn caffe)
     endif()
-  elseif(${the_module}_PERF_CLCAFFE)
+  elseif(OPENCV_DNN_PERF_CLCAFFE
+         OR ${the_module}_PERF_CAFFE  # compatibility for deprecated option
+  )
     find_package(Caffe QUIET)
     if (Caffe_FOUND)
       add_definitions(-DHAVE_CLCAFFE=1)