From 6f8a73bdf0d9f087b71e305c8bf468163a27de02 Mon Sep 17 00:00:00 2001 From: Vitaliy Lyudvichenko Date: Thu, 2 Jul 2015 12:31:48 +0300 Subject: [PATCH] Replaced CMake if() condition for standalone build. --- modules/dnn/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt index cfd4e846b..330addf0c 100644 --- a/modules/dnn/CMakeLists.txt +++ b/modules/dnn/CMakeLists.txt @@ -19,7 +19,8 @@ endif() endmacro(_dnn_find_protobuf) -if(BUILD_opencv_core)#build as OpenCV module +if(${CMAKE_PROJECT_NAME} STREQUAL "OpenCV")#build as OpenCV module + set(the_description "Deep neural network module. It allows to load models and to make forward pass") set(OPENCV_MODULE_IS_PART_OF_WORLD OFF) _dnn_find_protobuf() @@ -37,6 +38,7 @@ ocv_add_perf_tests() ocv_add_samples() else()#build as standalone module (for development purposes) + project(dnn_standalone) _dnn_find_protobuf()