protobuf build documenting: move the WITH_PROTOBUF option to the top level
authorAlexander Enaldiev <Alexander.Enaldiev@gmail.com>
Mon, 23 Apr 2018 12:15:34 +0000 (15:15 +0300)
committerAlexander Alekhin <alexander.alekhin@intel.com>
Thu, 26 Apr 2018 10:58:13 +0000 (13:58 +0300)
CMakeLists.txt
cmake/OpenCVFindProtobuf.cmake

index 96d2ef8c1c4d3277bc005ff722ac8759c62b5b74..6de26879cc60b90af47266dd875b370113815e91 100644 (file)
@@ -279,6 +279,7 @@ OCV_OPTION(WITH_GDAL           "Include GDAL Support"                        OFF
 OCV_OPTION(WITH_GPHOTO2        "Include gPhoto2 library support"             ON   IF (UNIX AND NOT ANDROID AND NOT IOS) )
 OCV_OPTION(WITH_LAPACK         "Include Lapack library support"              (NOT CV_DISABLE_OPTIMIZATION)  IF (NOT ANDROID AND NOT IOS) )
 OCV_OPTION(WITH_ITT            "Include Intel ITT support"                   ON   IF (NOT APPLE_FRAMEWORK) )
+OCV_OPTION(WITH_PROTOBUF       "Enable libprotobuf"                          ON )
 
 # OpenCV build components
 # ===================================================
index 16543fe7e007830ad9a06d472210218a35b8b181..b9171f14f0731a4c280c998e8e2ef7a0192ecb87 100644 (file)
@@ -1,15 +1,14 @@
 # If protobuf is found - libprotobuf target is available
 
-ocv_option(WITH_PROTOBUF "Enable libprotobuf" ON)
-ocv_option(BUILD_PROTOBUF "Force to build libprotobuf from sources" ON)
-ocv_option(PROTOBUF_UPDATE_FILES "Force rebuilding .proto files (protoc should be available)" OFF)
-
 set(HAVE_PROTOBUF FALSE)
 
 if(NOT WITH_PROTOBUF)
   return()
 endif()
 
+ocv_option(BUILD_PROTOBUF "Force to build libprotobuf from sources" ON)
+ocv_option(PROTOBUF_UPDATE_FILES "Force rebuilding .proto files (protoc should be available)" OFF)
+
 function(get_protobuf_version version include)
   file(STRINGS "${include}/google/protobuf/stubs/common.h" ver REGEX "#define GOOGLE_PROTOBUF_VERSION [0-9]+")
   string(REGEX MATCHALL "[0-9]+" ver ${ver})