From 85211f3ab66e15c7669a1c14a25564afcf31e2e6 Mon Sep 17 00:00:00 2001 From: Chuong Nguyen Date: Wed, 22 May 2019 03:26:14 +1000 Subject: [PATCH] Enable to compile to a single opencv_world library file (#3914) * Enable to compile to a single opencv_world library file --- ports/opencv/CONTROL | 3 +++ ports/opencv/portfile.cmake | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 6106a274e9..8b32750b7d 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -81,5 +81,8 @@ Feature: eigen Build-Depends: eigen3 Description: Eigen support for opencv +Feature: world +Description: Compile to a single package support for opencv + Feature: nonfree Description: allow nonfree and unredistributable libraries diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 9ea245ed30..3df6f6b509 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -20,6 +20,11 @@ string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) set(CMAKE_MODULE_PATH) +set(BUILD_opencv_world OFF) +if("world" IN_LIST FEATURES) + set(BUILD_opencv_world ON) +endif() + set(BUILD_opencv_dnn OFF) set(WITH_PROTOBUF OFF) if("dnn" IN_LIST FEATURES) @@ -274,6 +279,7 @@ vcpkg_configure_cmake( -DBUILD_opencv_python3=OFF -DBUILD_opencv_saliency=${BUILD_opencv_saliency} -DBUILD_opencv_sfm=${BUILD_opencv_sfm} + -DBUILD_opencv_world=${BUILD_opencv_world} # PROTOBUF -DPROTOBUF_UPDATE_FILES=${PROTOBUF_UPDATE_FILES} -DUPDATE_PROTO_FILES=${UPDATE_PROTO_FILES}