diff options
| author | ras0219 <533828+ras0219@users.noreply.github.com> | 2020-09-04 18:59:21 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-04 18:59:21 -0700 |
| commit | bb61fc16628994678ee3855008972a28797ba5a7 (patch) | |
| tree | 419d508bdf29a0edd04976e9ece7f8aa43e332b8 /ports/opencv4 | |
| parent | c41328a87c1436820f9e3dd2c970d407de52eaf7 (diff) | |
| download | vcpkg-bb61fc16628994678ee3855008972a28797ba5a7.tar.gz vcpkg-bb61fc16628994678ee3855008972a28797ba5a7.zip | |
[blaze][ceres][clapack][geogram][lapack][lapack-reference][opencv4][selene] Fix deps issues (#13229)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Diffstat (limited to 'ports/opencv4')
| -rw-r--r-- | ports/opencv4/CONTROL | 7 | ||||
| -rw-r--r-- | ports/opencv4/portfile.cmake | 74 |
2 files changed, 57 insertions, 24 deletions
diff --git a/ports/opencv4/CONTROL b/ports/opencv4/CONTROL index fa6388e66..f06945f44 100644 --- a/ports/opencv4/CONTROL +++ b/ports/opencv4/CONTROL @@ -1,5 +1,6 @@ Source: opencv4 Version: 4.3.0 +Port-Version: 1 Build-Depends: protobuf, zlib Homepage: https://github.com/opencv/opencv Description: computer vision library @@ -17,7 +18,7 @@ Build-Depends: hdf5 (!uwp), tesseract (!uwp) Description: opencv_contrib module Feature: cuda -Build-Depends: opencv4[contrib], cuda, cudnn +Build-Depends: opencv4[core,contrib], cuda, cudnn Description: CUDA support for opencv Feature: dnn @@ -62,7 +63,7 @@ Feature: openmp Description: Enable openmp support for opencv Feature: ovis -Build-Depends: opencv4[contrib], ogre +Build-Depends: opencv4[core,contrib], ogre Description: opencv_ovis module Feature: png @@ -74,7 +75,7 @@ Build-Depends: qt5-base[core] Description: Qt GUI support for opencv Feature: sfm -Build-Depends: opencv4[contrib], eigen3, glog, gflags, ceres +Build-Depends: opencv4[core,contrib], opencv4[core,eigen], glog, gflags, ceres Description: opencv_sfm module Feature: tbb diff --git a/ports/opencv4/portfile.cmake b/ports/opencv4/portfile.cmake index 522623c45..0ea97e777 100644 --- a/ports/opencv4/portfile.cmake +++ b/ports/opencv4/portfile.cmake @@ -374,17 +374,16 @@ vcpkg_copy_pdbs() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake OPENCV_MODULES) - string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)" - "set(CMAKE_IMPORT_FILE_VERSION 1) -find_package(Protobuf REQUIRED) -if(Protobuf_FOUND) + set(DEPS_STRING "include(CMakeFindDependencyMacro) +find_dependency(protobuf CONFIG) +if(protobuf_FOUND) if(TARGET protobuf::libprotobuf) - add_library(libprotobuf INTERFACE IMPORTED) + add_library (libprotobuf INTERFACE IMPORTED) set_target_properties(libprotobuf PROPERTIES INTERFACE_LINK_LIBRARIES protobuf::libprotobuf ) else() - add_library(libprotobuf UNKNOWN IMPORTED) + add_library (libprotobuf UNKNOWN IMPORTED) set_target_properties(libprotobuf PROPERTIES IMPORTED_LOCATION \"${Protobuf_LIBRARY}\" INTERFACE_INCLUDE_DIRECTORIES \"${Protobuf_INCLUDE_DIR}\" @@ -392,24 +391,57 @@ if(Protobuf_FOUND) ) endif() endif() -find_package(CUDA QUIET) -find_package(Threads QUIET) -find_package(TIFF QUIET) -find_package(HDF5 QUIET) -find_package(Freetype QUIET) -find_package(Ogre QUIET) -find_package(gflags QUIET) -find_package(Ceres QUIET) -find_package(ade QUIET) -find_package(VTK QUIET) -find_package(OpenMP QUIET) -find_package(Tesseract QUIET) -find_package(OpenEXR QUIET) +find_dependency(Threads)") + if("tiff" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(TIFF)") + endif() + if("cuda" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(CUDA)") + endif() + if(BUILD_opencv_quality) + string(APPEND DEPS_STRING " +# C language is required for try_compile tests in FindHDF5 +enable_language(C) +find_dependency(HDF5) +find_dependency(Tesseract)") + endif() + if(WITH_TBB) + string(APPEND DEPS_STRING "\nfind_dependency(TBB)") + endif() + if(WITH_VTK) + string(APPEND DEPS_STRING "\nfind_dependency(VTK)") + endif() + if("sfm" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(gflags CONFIG)\nfind_dependency(Ceres CONFIG)") + endif() + if("eigen" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(Eigen3 CONFIG)") + endif() + if("openexr" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(OpenEXR CONFIG)") + endif() + if(WITH_OPENMP) + string(APPEND DEPS_STRING "\nfind_dependency(OpenMP CONFIG)") + endif() + if(BUILD_opencv_ovis) + string(APPEND DEPS_STRING "\nfind_dependency(Ogre)\nfind_dependency(Freetype)") + endif() + if("qt" IN_LIST FEATURES) + string(APPEND DEPS_STRING " set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -find_package(Qt5 COMPONENTS OpenGL Concurrent Test QUIET) -find_package(GDCM QUIET)" OPENCV_MODULES "${OPENCV_MODULES}") +find_dependency(Qt5 COMPONENTS OpenGL Concurrent Test)") + endif() + if("ade" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(ade)") + endif() + if("gdcm" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(GDCM)") + endif() + + string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)" + "set(CMAKE_IMPORT_FILE_VERSION 1)\n${DEPS_STRING}" OPENCV_MODULES "${OPENCV_MODULES}") if(WITH_OPENMP) string(REPLACE "set_target_properties(opencv_core PROPERTIES |
