mirror of
https://github.com/microsoft/vcpkg
synced 2024-11-20 16:06:00 -07:00
[libarchive+tesseract+opencv] add missing libarchiveConfig.cmake, fix tesseract downstream and unblock opencv CI (#15089)
* [tesseract] add missing reference for downstream projects * [tesseract] restore ci, fix many regressions that are uncovered by that * Update ports/opencv2/CONTROL Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * [opencv] fix regressions on uwp, accept failure on arm64 for now * Apply suggestions from code review Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * [opencv4] allow failures on all arm windows targets, both win32 and uwp * adopts hints from #15180 * [libarchive] bump control version * [libarchive] use vcpkg-cmake-wrapper instead of a custom libarchiveConfig, since it is vcpkg-provided and not port-provided * enable features to be visible in parent scope * apply documentation fix from CI * [libarchive] remove unnecessary lines in portfile * fix regressions * Update ports/gdcm/CONTROL * use more compact logic syntax * add new versions to baseline Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
This commit is contained in:
parent
31eda3e931
commit
f89336d703
29 changed files with 192 additions and 112 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -316,6 +316,7 @@ __pycache__/
|
|||
############################################################
|
||||
# vcpkg - End
|
||||
############################################################
|
||||
vcpkg.disable-metrics
|
||||
archives
|
||||
.DS_Store
|
||||
prefab/
|
||||
|
@ -325,3 +326,4 @@ prefab/
|
|||
# Codespaces
|
||||
###################
|
||||
pythonenv3.8/
|
||||
.venv/
|
||||
|
|
|
@ -4,7 +4,7 @@ Check if one or more features are a part of a package installation.
|
|||
## Usage
|
||||
```cmake
|
||||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS <FEATURE_OPTIONS>
|
||||
OUT_FEATURE_OPTIONS <FEATURE_OPTIONS>
|
||||
[FEATURES
|
||||
<cuda> <WITH_CUDA>
|
||||
[<opencv> <WITH_OPENCV>]
|
||||
|
@ -15,27 +15,27 @@ vcpkg_check_features(
|
|||
...]
|
||||
)
|
||||
```
|
||||
`vcpkg_check_features()` accepts these parameters:
|
||||
`vcpkg_check_features()` accepts these parameters:
|
||||
|
||||
* `OUT_FEATURE_OPTIONS`:
|
||||
An output variable, the function will clear the variable passed to `OUT_FEATURE_OPTIONS`
|
||||
* `OUT_FEATURE_OPTIONS`:
|
||||
An output variable, the function will clear the variable passed to `OUT_FEATURE_OPTIONS`
|
||||
and then set it to contain a list of option definitions (`-D<OPTION_NAME>=ON|OFF`).
|
||||
|
||||
This should be set to `FEATURE_OPTIONS` by convention.
|
||||
|
||||
* `FEATURES`:
|
||||
A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs.
|
||||
For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of:
|
||||
|
||||
* `-D<OPTION_NAME>=ON`, if a feature is specified for installation,
|
||||
* `-D<OPTION_NAME>=OFF`, otherwise.
|
||||
|
||||
* `INVERTED_FEATURES`:
|
||||
A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs, uses reversed logic from `FEATURES`.
|
||||
For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of:
|
||||
|
||||
This should be set to `FEATURE_OPTIONS` by convention.
|
||||
|
||||
* `FEATURES`:
|
||||
A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs.
|
||||
For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of:
|
||||
|
||||
* `-D<OPTION_NAME>=ON`, if a feature is specified for installation,
|
||||
* `-D<OPTION_NAME>=OFF`, otherwise.
|
||||
|
||||
* `INVERTED_FEATURES`:
|
||||
A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs, uses reversed logic from `FEATURES`.
|
||||
For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of:
|
||||
|
||||
* `-D<OPTION_NAME>=OFF`, if a feature is specified for installation,
|
||||
* `-D<OPTION_NAME>=ON`, otherwise.
|
||||
* `-D<OPTION_NAME>=ON`, otherwise.
|
||||
|
||||
|
||||
## Notes
|
||||
|
@ -44,8 +44,8 @@ The `FEATURES` name parameter can be omitted if no `INVERTED_FEATURES` are used.
|
|||
|
||||
At least one (`FEATURE_NAME`, `OPTION_NAME`) pair must be passed to the function call.
|
||||
|
||||
Arguments passed to `FEATURES` and `INVERTED_FEATURES` are not validated to prevent duplication.
|
||||
If the same (`FEATURE_NAME`, `OPTION_NAME`) pair is passed to both lists,
|
||||
Arguments passed to `FEATURES` and `INVERTED_FEATURES` are not validated to prevent duplication.
|
||||
If the same (`FEATURE_NAME`, `OPTION_NAME`) pair is passed to both lists,
|
||||
two conflicting definitions are added to `OUT_FEATURE_OPTIONS`.
|
||||
|
||||
|
||||
|
@ -113,7 +113,7 @@ vcpkg_configure_cmake(
|
|||
# Expands to "-DWITH_CUDA=ON; -DBUILD_CUDA=ON; -DBUILD_GPU=ON"
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
```
|
||||
```
|
||||
|
||||
### Example 4: Use regular and inverted features
|
||||
|
||||
|
@ -135,7 +135,7 @@ vcpkg_configure_cmake(
|
|||
# Expands to "-DWITH_TBB=ON; -DROCKSDB_IGNORE_PACKAGE_TBB=OFF"
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
```
|
||||
```
|
||||
|
||||
## Examples in portfiles
|
||||
|
||||
|
|
|
@ -1633,8 +1633,8 @@
|
|||
"port-version": 4
|
||||
},
|
||||
"dmlc": {
|
||||
"baseline": "2019-08-12-4",
|
||||
"port-version": 0
|
||||
"baseline": "2019-08-12",
|
||||
"port-version": 5
|
||||
},
|
||||
"docopt": {
|
||||
"baseline": "2018-11-01",
|
||||
|
@ -2066,7 +2066,7 @@
|
|||
},
|
||||
"gdcm": {
|
||||
"baseline": "3.0.7",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"gdcm2": {
|
||||
"baseline": "deprecated",
|
||||
|
@ -2814,7 +2814,7 @@
|
|||
},
|
||||
"libarchive": {
|
||||
"baseline": "3.4.3",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"libass": {
|
||||
"baseline": "0.15.0",
|
||||
|
@ -4190,19 +4190,19 @@
|
|||
},
|
||||
"opencv": {
|
||||
"baseline": "4.3.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"opencv2": {
|
||||
"baseline": "2.4.13.7",
|
||||
"port-version": 4
|
||||
"port-version": 5
|
||||
},
|
||||
"opencv3": {
|
||||
"baseline": "3.4.10",
|
||||
"port-version": 4
|
||||
"port-version": 5
|
||||
},
|
||||
"opencv4": {
|
||||
"baseline": "4.3.0",
|
||||
"port-version": 4
|
||||
"port-version": 5
|
||||
},
|
||||
"opendnp3": {
|
||||
"baseline": "3.1.0",
|
||||
|
@ -5626,7 +5626,7 @@
|
|||
},
|
||||
"tesseract": {
|
||||
"baseline": "4.1.1",
|
||||
"port-version": 5
|
||||
"port-version": 6
|
||||
},
|
||||
"tfhe": {
|
||||
"baseline": "1.0.1-1",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "162f71aa6f31426d3e8cbbb2614c8bba689e7bbc",
|
||||
"version-string": "2019-08-12",
|
||||
"port-version": 5
|
||||
},
|
||||
{
|
||||
"git-tree": "679cba8e39c453c95a626180449c68a0aa41f724",
|
||||
"version-string": "2019-08-12-4",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "151374d525077e7d8229b4ad2bf8f1630f36fbb5",
|
||||
"version-string": "3.0.7",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "cc2b78ff93cde95d5d9a4c9c9b4b2a393a7195a2",
|
||||
"version-string": "3.0.7",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "114dd98b5e7865923e2e06a1ffad5661b0aec246",
|
||||
"version-string": "3.4.3",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "5f418195172c2db767e6f0bae8ff4d07101c70e5",
|
||||
"version-string": "3.4.3",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "6732874b9a119e4de4e9afdc72469c967348b21b",
|
||||
"version-string": "4.3.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "ad5aa4dfbaa294ebc717c4a057ee7a5ce1dc297c",
|
||||
"version-string": "4.3.0",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "50a5602ecab15fd1c36f0619a5fdbd4792eb1b23",
|
||||
"version-string": "2.4.13.7",
|
||||
"port-version": 5
|
||||
},
|
||||
{
|
||||
"git-tree": "7a9db98ab98f632cba250ec9290924c4027a8f0d",
|
||||
"version-string": "2.4.13.7",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a761625dd5d17548aaa9611295ace23ca8bc27fc",
|
||||
"version-string": "3.4.10",
|
||||
"port-version": 5
|
||||
},
|
||||
{
|
||||
"git-tree": "d08b6595a75aefc70b70a366a07c2a3b1dd66e92",
|
||||
"version-string": "3.4.10",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "f6fbdfab1e9ac01652b51f2251715c2be05a6567",
|
||||
"version-string": "4.3.0",
|
||||
"port-version": 5
|
||||
},
|
||||
{
|
||||
"git-tree": "bda3727a0c91b614fe1b275e27ad4b68f214eebe",
|
||||
"version-string": "4.3.0",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "46aa8d12c08674f4518e9b74b32826bbb380cac9",
|
||||
"version-string": "4.1.1",
|
||||
"port-version": 6
|
||||
},
|
||||
{
|
||||
"git-tree": "118674017f17f5289563c3b07f4fe5403d508151",
|
||||
"version-string": "4.1.1",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
Source: dmlc
|
||||
Version: 2019-08-12-4
|
||||
Version: 2019-08-12
|
||||
Port-Version: 5
|
||||
Homepage: https://github.com/dmlc/dmlc-core
|
||||
Description: DMLC-Core is the backbone library to support all DMLC projects, offers the bricks to build efficient and scalable distributed machine learning libraries.
|
||||
Default-Features: openmp
|
||||
Supports: !uwp
|
||||
|
||||
Feature: openmp
|
||||
Description: Build with openmp
|
||||
Description: Build with openmp
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
Source: gdcm
|
||||
Version: 3.0.7
|
||||
Port-Version: 1
|
||||
Homepage: https://github.com/malaterre/GDCM
|
||||
Description: Grassroots DICOM library
|
||||
Build-Depends: zlib, expat, openjpeg
|
||||
Supports: !uwp
|
||||
Supports: !uwp&!(windows&(arm|arm64))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Source: libarchive
|
||||
Version: 3.4.3
|
||||
Port-Version: 2
|
||||
Port-Version: 3
|
||||
Homepage: https://github.com/libarchive/libarchive
|
||||
Description: Library for reading and writing streaming archives
|
||||
Build-Depends: zlib
|
||||
|
|
|
@ -64,19 +64,13 @@ vcpkg_configure_cmake(
|
|||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
foreach(_feature IN LISTS FEATURE_OPTIONS)
|
||||
string(REPLACE "-D" "" _feature "${_feature}")
|
||||
string(REPLACE "=" ";" _feature "${_feature}")
|
||||
string(REPLACE "ON" "1" _feature "${_feature}")
|
||||
string(REPLACE "OFF" "0" _feature "${_feature}")
|
||||
list(GET _feature 0 _feature_name)
|
||||
list(GET _feature 1 _feature_status)
|
||||
set(${_feature_name} ${_feature_status})
|
||||
endforeach()
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
foreach(HEADER ${CURRENT_PACKAGES_DIR}/include/archive.h ${CURRENT_PACKAGES_DIR}/include/archive_entry.h)
|
||||
file(READ ${HEADER} CONTENTS)
|
||||
string(REPLACE "(!defined LIBARCHIVE_STATIC)" "0" CONTENTS "${CONTENTS}")
|
||||
|
|
|
@ -1,29 +1,50 @@
|
|||
_find_package(${ARGS})
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
if(@ENABLE_ZLIB@)
|
||||
find_dependency(ZLIB)
|
||||
endif()
|
||||
if(@ENABLE_BZip2@)
|
||||
find_dependency(BZip2)
|
||||
endif()
|
||||
if(@ENABLE_LIBXML2@)
|
||||
find_dependency(LibXml2)
|
||||
endif()
|
||||
if(@ENABLE_LZ4@)
|
||||
find_dependency(lz4)
|
||||
endif()
|
||||
if(@ENABLE_LZMA@)
|
||||
find_dependency(LibLZMA)
|
||||
endif()
|
||||
if(@ENABLE_ZSTD@)
|
||||
find_dependency(zstd)
|
||||
endif()
|
||||
if(@ENABLE_OPENSSL@)
|
||||
find_dependency(OpenSSL)
|
||||
endif()
|
||||
if(@ENABLE_LZO@)
|
||||
find_library(LZO_LIBRARY_DEBUG NAMES lzo2d lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
|
||||
find_library(LZO_LIBRARY_RELEASE NAMES lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
|
||||
if(@ENABLE_ZLIB@)
|
||||
find_package(ZLIB REQUIRED)
|
||||
list(APPEND LibArchive_LIBRARIES ZLIB::ZLIB)
|
||||
endif()
|
||||
if(@ENABLE_BZip2@)
|
||||
find_package(BZip2 REQUIRED)
|
||||
list(APPEND LibArchive_LIBRARIES BZip2::BZip2)
|
||||
endif()
|
||||
if(@ENABLE_LIBXML2@)
|
||||
find_package(LibXml2 REQUIRED)
|
||||
list(APPEND LibArchive_LIBRARIES LibXml2::LibXml2)
|
||||
endif()
|
||||
if(@ENABLE_LZ4@)
|
||||
find_package(lz4 REQUIRED)
|
||||
list(APPEND LibArchive_LIBRARIES lz4::lz4)
|
||||
endif()
|
||||
if(@ENABLE_LZMA@)
|
||||
find_package(LibLZMA REQUIRED)
|
||||
list(APPEND LibArchive_LIBRARIES LibLZMA::LibLZMA)
|
||||
endif()
|
||||
if(@ENABLE_LZO@)
|
||||
find_library(LZO_LIBRARY_DEBUG NAMES lzo2d lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
|
||||
find_library(LZO_LIBRARY_RELEASE NAMES lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
|
||||
if(LZO_LIBRARY_RELEASE)
|
||||
list(APPEND LibArchive_LIBRARIES optimized ${LZO_LIBRARY_RELEASE})
|
||||
endif()
|
||||
|
@ -32,7 +53,6 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
|
|||
endif()
|
||||
endif()
|
||||
if(@ENABLE_ZSTD@)
|
||||
find_package(zstd CONFIG REQUIRED)
|
||||
if(TARGET zstd::libzstd_shared)
|
||||
list(APPEND LibArchive_LIBRARIES zstd::libzstd_shared)
|
||||
else(TARGET zstd::libzstd_shared)
|
||||
|
@ -40,7 +60,6 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
|
|||
endif(TARGET zstd::libzstd_shared)
|
||||
endif()
|
||||
if(@ENABLE_OPENSSL@)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
list(APPEND LibArchive_LIBRARIES OpenSSL::Crypto)
|
||||
endif()
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
Source: opencv
|
||||
Version: 4.3.0
|
||||
Port-Version: 1
|
||||
Homepage: https://github.com/opencv/opencv
|
||||
Description: Computer vision library
|
||||
Build-Depends: opencv4[core]
|
||||
Default-Features: dnn, jpeg, opengl, png, tiff, webp
|
||||
Default-Features: dnn, jpeg, png, tiff, webp
|
||||
|
||||
Feature: nonfree
|
||||
Build-Depends: opencv4[core,nonfree]
|
||||
|
@ -53,6 +54,10 @@ Feature: jpeg
|
|||
Build-Depends: opencv4[core,jpeg]
|
||||
Description: JPEG support for opencv
|
||||
|
||||
Feature: lapack
|
||||
Build-Depends: opencv4[core,lapack]
|
||||
Description: LAPACK support for opencv
|
||||
|
||||
Feature: openexr
|
||||
Build-Depends: opencv4[core,openexr]
|
||||
Description: OpenEXR support for opencv
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
Source: opencv2
|
||||
Version: 2.4.13.7
|
||||
Port-Version: 4
|
||||
Port-Version: 5
|
||||
Build-Depends: zlib
|
||||
Description: computer vision library, version 2
|
||||
Default-Features: eigen, jpeg, opengl, png, tiff
|
||||
Default-Features: eigen, jpeg, png, tiff
|
||||
|
||||
Feature: cuda
|
||||
Build-Depends: cuda
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
Source: opencv3
|
||||
Version: 3.4.10
|
||||
Port-Version: 4
|
||||
Port-Version: 5
|
||||
Build-Depends: zlib
|
||||
Homepage: https://github.com/opencv/opencv
|
||||
Description: computer vision library
|
||||
Default-Features: dnn, jpeg, opengl, png, tiff, webp
|
||||
Default-Features: dnn, jpeg, png, tiff, webp
|
||||
|
||||
Feature: nonfree
|
||||
Description: allow nonfree and unredistributable libraries
|
||||
|
@ -14,7 +14,7 @@ Build-Depends: protobuf
|
|||
Description: opencv_flann module
|
||||
|
||||
Feature: contrib
|
||||
Build-Depends: opencv3[dnn], hdf5 (!uwp), tesseract (!uwp)
|
||||
Build-Depends: opencv3[dnn], hdf5 (!uwp&!(windows&(arm|arm64))), tesseract (!uwp&!(windows&(arm|arm64)))
|
||||
Description: opencv_contrib module
|
||||
|
||||
Feature: cuda
|
||||
|
@ -52,6 +52,10 @@ Feature: jpeg
|
|||
Build-Depends: libjpeg-turbo
|
||||
Description: JPEG support for opencv
|
||||
|
||||
Feature: lapack
|
||||
Build-Depends: blas, lapack
|
||||
Description: LAPACK support for opencv
|
||||
|
||||
Feature: openexr
|
||||
Build-Depends: openexr
|
||||
Description: OpenEXR support for opencv
|
||||
|
|
|
@ -38,6 +38,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|||
"halide" WITH_HALIDE
|
||||
"jasper" WITH_JASPER
|
||||
"jpeg" WITH_JPEG
|
||||
"lapack" WITH_LAPACK
|
||||
"nonfree" OPENCV_ENABLE_NONFREE
|
||||
"openexr" WITH_OPENEXR
|
||||
"opengl" WITH_OPENGL
|
||||
|
@ -314,8 +315,6 @@ vcpkg_configure_cmake(
|
|||
-DWITH_OPENCLAMDBLAS=OFF
|
||||
-DWITH_TBB=${WITH_TBB}
|
||||
-DWITH_OPENJPEG=OFF
|
||||
###### WITH PROPERTIES explicitly disabled, they have problems with libraries if already installed by user and that are "involuntarily" found during install
|
||||
-DWITH_LAPACK=OFF
|
||||
###### BUILD_options (mainly modules which require additional libraries)
|
||||
-DBUILD_opencv_ovis=${BUILD_opencv_ovis}
|
||||
-DBUILD_opencv_dnn=${BUILD_opencv_dnn}
|
||||
|
@ -374,11 +373,14 @@ find_dependency(Tesseract)")
|
|||
if("eigen" IN_LIST FEATURES)
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(Eigen3 CONFIG)")
|
||||
endif()
|
||||
if("lapack" IN_LIST FEATURES)
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(LAPACK)")
|
||||
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)")
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(OpenMP)")
|
||||
endif()
|
||||
if(BUILD_opencv_ovis)
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(Ogre)\nfind_dependency(Freetype)")
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
Source: opencv4
|
||||
Version: 4.3.0
|
||||
Port-Version: 4
|
||||
Port-Version: 5
|
||||
Build-Depends: zlib
|
||||
Homepage: https://github.com/opencv/opencv
|
||||
Description: computer vision library
|
||||
Default-Features: dnn, jpeg, opengl, png, tiff, webp
|
||||
Default-Features: dnn, jpeg, png, tiff, webp
|
||||
|
||||
Feature: nonfree
|
||||
Description: allow nonfree and unredistributable libraries
|
||||
|
@ -14,7 +14,7 @@ Build-Depends: ade
|
|||
Description: graph api
|
||||
|
||||
Feature: contrib
|
||||
Build-Depends: hdf5 (!uwp), tesseract (!uwp)
|
||||
Build-Depends: hdf5 (!uwp&!(windows&(arm|arm64))), tesseract (!uwp&!(windows&(arm|arm64)))
|
||||
Description: opencv_contrib module
|
||||
|
||||
Feature: cuda
|
||||
|
@ -52,6 +52,10 @@ Feature: jpeg
|
|||
Build-Depends: libjpeg-turbo
|
||||
Description: JPEG support for opencv
|
||||
|
||||
Feature: lapack
|
||||
Build-Depends: blas, lapack
|
||||
Description: LAPACK support for opencv
|
||||
|
||||
Feature: openexr
|
||||
Build-Depends: openexr
|
||||
Description: OpenEXR support for opencv
|
||||
|
|
|
@ -19,8 +19,8 @@ vcpkg_from_github(
|
|||
0002-install-options.patch
|
||||
0003-force-package-requirements.patch
|
||||
0004-fix-policy-CMP0057.patch
|
||||
0006-fix-vtk9.patch
|
||||
0006-jpeg2000_getref.patch
|
||||
0008-fix-vtk9.patch
|
||||
0009-fix-uwp.patch
|
||||
0010-fix-interface_link_libraries.patch # Remove this patch when the next update
|
||||
)
|
||||
|
@ -42,6 +42,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|||
"halide" WITH_HALIDE
|
||||
"jasper" WITH_JASPER
|
||||
"jpeg" WITH_JPEG
|
||||
"lapack" WITH_LAPACK
|
||||
"nonfree" OPENCV_ENABLE_NONFREE
|
||||
"openexr" WITH_OPENEXR
|
||||
"opengl" WITH_OPENGL
|
||||
|
@ -65,6 +66,19 @@ if("dnn" IN_LIST FEATURES)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
#OpenCV on arm on windows platform (non UWP) has serious problems right now. Disabling this module is not enough (remember to put the definition in vcpkg_configure_cmake)
|
||||
#set(BUILD_opencv_surface_matching ON)
|
||||
#if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm")
|
||||
# set(BUILD_opencv_surface_matching OFF)
|
||||
# message(WARNING "The surface_matching module cannot be enabled on ARM architectures")
|
||||
#endif()
|
||||
|
||||
set(BUILD_opencv_gapi ON)
|
||||
if(VCPKG_TARGET_IS_UWP)
|
||||
set(BUILD_opencv_gapi OFF)
|
||||
message(WARNING "The gapi module cannot be enabled on UWP platform")
|
||||
endif()
|
||||
|
||||
set(WITH_IPP OFF)
|
||||
if("ipp" IN_LIST FEATURES)
|
||||
set(WITH_IPP ON)
|
||||
|
@ -346,13 +360,12 @@ vcpkg_configure_cmake(
|
|||
-DWITH_PROTOBUF=${BUILD_opencv_dnn}
|
||||
-DWITH_TBB=${WITH_TBB}
|
||||
-DWITH_OPENJPEG=OFF
|
||||
###### WITH PROPERTIES explicitly disabled, they have problems with libraries if already installed by user and that are "involuntarily" found during install
|
||||
-DWITH_LAPACK=OFF
|
||||
###### BUILD_options (mainly modules which require additional libraries)
|
||||
-DBUILD_opencv_ovis=${BUILD_opencv_ovis}
|
||||
-DBUILD_opencv_dnn=${BUILD_opencv_dnn}
|
||||
###### The following modules are disabled for UWP
|
||||
-DBUILD_opencv_quality=${BUILD_opencv_quality}
|
||||
-DBUILD_opencv_gapi=${DBUILD_opencv_gapi}
|
||||
###### The following module is disabled because it's broken #https://github.com/opencv/opencv_contrib/issues/2307
|
||||
-DBUILD_opencv_rgbd=OFF
|
||||
###### Additional build flags
|
||||
|
@ -411,8 +424,11 @@ find_dependency(Tesseract)")
|
|||
if("openexr" IN_LIST FEATURES)
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(OpenEXR CONFIG)")
|
||||
endif()
|
||||
if("lapack" IN_LIST FEATURES)
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(LAPACK)")
|
||||
endif()
|
||||
if(WITH_OPENMP)
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(OpenMP CONFIG)")
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(OpenMP)")
|
||||
endif()
|
||||
if(BUILD_opencv_ovis)
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(Ogre)\nfind_dependency(Freetype)")
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
Source: tesseract
|
||||
Version: 4.1.1
|
||||
Port-Version: 5
|
||||
Port-Version: 6
|
||||
Homepage: https://github.com/tesseract-ocr/tesseract
|
||||
Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google.
|
||||
Build-Depends: leptonica, libarchive
|
||||
Supports: !(windows&(arm|arm64))
|
||||
|
||||
Feature: training-tools
|
||||
Description: build training tools
|
||||
|
|
|
@ -42,12 +42,7 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
|||
file(READ ${CURRENT_PACKAGES_DIR}/share/tesseract/TesseractConfig.cmake TESSERACT_CONFIG)
|
||||
string(REPLACE "find_package(Leptonica REQUIRED)"
|
||||
"find_package(Leptonica REQUIRED)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(BZip2 REQUIRED)
|
||||
find_package(LibXml2 REQUIRED)
|
||||
find_package(zstd REQUIRED)
|
||||
find_package(LibLZMA REQUIRED)" TESSERACT_CONFIG "${TESSERACT_CONFIG}")
|
||||
find_package(LibArchive REQUIRED)" TESSERACT_CONFIG "${TESSERACT_CONFIG}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/tesseract/TesseractConfig.cmake "${TESSERACT_CONFIG}")
|
||||
|
||||
vcpkg_copy_tools(TOOL_NAMES tesseract AUTO_CLEAN)
|
||||
|
|
|
@ -365,8 +365,6 @@ gasol:arm64-windows=fail
|
|||
gasol:arm-uwp=fail
|
||||
gasol:x64-uwp=fail
|
||||
gdal:x64-windows-static-md=fail
|
||||
gdcm:arm64-windows=fail
|
||||
gdcm:x64-linux = skip
|
||||
geos:arm-uwp=fail
|
||||
geos:x64-uwp=fail
|
||||
|
||||
|
@ -1140,6 +1138,8 @@ opencv3:x64-windows = skip
|
|||
opencv3:x64-windows-static = skip
|
||||
opencv3:x64-windows-static-md=skip
|
||||
opencv3:x86-windows = skip
|
||||
opencv4:arm64-windows = fail
|
||||
opencv4:arm-uwp = fail
|
||||
opendnp3:x64-uwp=fail
|
||||
opendnp3:arm-uwp=fail
|
||||
openexr:arm64-windows=fail
|
||||
|
@ -1567,11 +1567,6 @@ teemo:arm64-windows=fail
|
|||
teemo:x64-osx=fail
|
||||
telnetpp:arm-uwp=fail
|
||||
telnetpp:x64-uwp=fail
|
||||
tesseract:x64-windows=fail
|
||||
tesseract:x64-windows-static=fail
|
||||
tesseract:x64-windows-static-md=fail
|
||||
tesseract:x86-windows=fail
|
||||
tesseract:arm64-windows=fail
|
||||
tfhe:x86-windows=fail
|
||||
tfhe:x64-windows=fail
|
||||
tfhe:x64-windows-static=fail
|
||||
|
|
|
@ -5,7 +5,7 @@ Check if one or more features are a part of a package installation.
|
|||
## Usage
|
||||
```cmake
|
||||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS <FEATURE_OPTIONS>
|
||||
OUT_FEATURE_OPTIONS <FEATURE_OPTIONS>
|
||||
[FEATURES
|
||||
<cuda> <WITH_CUDA>
|
||||
[<opencv> <WITH_OPENCV>]
|
||||
|
@ -16,27 +16,27 @@ vcpkg_check_features(
|
|||
...]
|
||||
)
|
||||
```
|
||||
`vcpkg_check_features()` accepts these parameters:
|
||||
`vcpkg_check_features()` accepts these parameters:
|
||||
|
||||
* `OUT_FEATURE_OPTIONS`:
|
||||
An output variable, the function will clear the variable passed to `OUT_FEATURE_OPTIONS`
|
||||
* `OUT_FEATURE_OPTIONS`:
|
||||
An output variable, the function will clear the variable passed to `OUT_FEATURE_OPTIONS`
|
||||
and then set it to contain a list of option definitions (`-D<OPTION_NAME>=ON|OFF`).
|
||||
|
||||
This should be set to `FEATURE_OPTIONS` by convention.
|
||||
|
||||
* `FEATURES`:
|
||||
A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs.
|
||||
For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of:
|
||||
|
||||
* `-D<OPTION_NAME>=ON`, if a feature is specified for installation,
|
||||
* `-D<OPTION_NAME>=OFF`, otherwise.
|
||||
|
||||
* `INVERTED_FEATURES`:
|
||||
A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs, uses reversed logic from `FEATURES`.
|
||||
For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of:
|
||||
|
||||
This should be set to `FEATURE_OPTIONS` by convention.
|
||||
|
||||
* `FEATURES`:
|
||||
A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs.
|
||||
For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of:
|
||||
|
||||
* `-D<OPTION_NAME>=ON`, if a feature is specified for installation,
|
||||
* `-D<OPTION_NAME>=OFF`, otherwise.
|
||||
|
||||
* `INVERTED_FEATURES`:
|
||||
A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs, uses reversed logic from `FEATURES`.
|
||||
For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of:
|
||||
|
||||
* `-D<OPTION_NAME>=OFF`, if a feature is specified for installation,
|
||||
* `-D<OPTION_NAME>=ON`, otherwise.
|
||||
* `-D<OPTION_NAME>=ON`, otherwise.
|
||||
|
||||
|
||||
## Notes
|
||||
|
@ -45,8 +45,8 @@ The `FEATURES` name parameter can be omitted if no `INVERTED_FEATURES` are used.
|
|||
|
||||
At least one (`FEATURE_NAME`, `OPTION_NAME`) pair must be passed to the function call.
|
||||
|
||||
Arguments passed to `FEATURES` and `INVERTED_FEATURES` are not validated to prevent duplication.
|
||||
If the same (`FEATURE_NAME`, `OPTION_NAME`) pair is passed to both lists,
|
||||
Arguments passed to `FEATURES` and `INVERTED_FEATURES` are not validated to prevent duplication.
|
||||
If the same (`FEATURE_NAME`, `OPTION_NAME`) pair is passed to both lists,
|
||||
two conflicting definitions are added to `OUT_FEATURE_OPTIONS`.
|
||||
|
||||
|
||||
|
@ -114,7 +114,7 @@ vcpkg_configure_cmake(
|
|||
# Expands to "-DWITH_CUDA=ON; -DBUILD_CUDA=ON; -DBUILD_GPU=ON"
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
```
|
||||
```
|
||||
|
||||
### Example 4: Use regular and inverted features
|
||||
|
||||
|
@ -136,7 +136,7 @@ vcpkg_configure_cmake(
|
|||
# Expands to "-DWITH_TBB=ON; -DROCKSDB_IGNORE_PACKAGE_TBB=OFF"
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
```
|
||||
```
|
||||
|
||||
## Examples in portfiles
|
||||
|
||||
|
@ -172,8 +172,10 @@ function(vcpkg_check_features)
|
|||
set(_vcf_FEATURE_VARIABLE ${_vcf_ARG})
|
||||
if(${_vcf_FEATURE_NAME} IN_LIST FEATURES)
|
||||
list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VARIABLE}=${_set_if}")
|
||||
set(${_vcf_FEATURE_VARIABLE} "${_set_if}" PARENT_SCOPE)
|
||||
else()
|
||||
list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VARIABLE}=${_set_else}")
|
||||
set(${_vcf_FEATURE_VARIABLE} "${_set_else}" PARENT_SCOPE)
|
||||
endif()
|
||||
set(_vcf_IS_FEATURE_NAME_ARG ON)
|
||||
endif()
|
||||
|
@ -185,7 +187,7 @@ function(vcpkg_check_features)
|
|||
if (DEFINED _vcf_FEATURES OR DEFINED _vcf_INVERTED_FEATURES)
|
||||
_check_features(_vcf_FEATURES ON OFF)
|
||||
_check_features(_vcf_INVERTED_FEATURES OFF ON)
|
||||
else()
|
||||
else()
|
||||
# Skip arguments that correspond to OUT_FEATURE_OPTIONS and its value.
|
||||
list(SUBLIST ARGN 2 -1 _vcf_ARGN)
|
||||
_check_features(_vcf_ARGN ON OFF)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Source: vcpkg-ci-opencv
|
||||
Version: 1
|
||||
Port-Version: 1
|
||||
Port-Version: 2
|
||||
Homepage: https://github.com/microsoft/vcpkg
|
||||
Description: Port to force features of certain ports within CI
|
||||
Build-Depends: opencv[nonfree,ade,contrib,dnn,eigen,ffmpeg,gdcm,ipp,jasper,jpeg,openexr,opengl,openmp,png,qt,sfm,tiff,vtk]
|
||||
Build-Depends: opencv[core,nonfree,ade,contrib,dnn,eigen,ffmpeg,gdcm,ipp,jasper,jpeg,lapack,openexr,opengl,openmp,png,qt,sfm,tiff,vtk,webp](!uwp&!(windows&(arm|arm64))), opencv[core,nonfree,ade,contrib,dnn,eigen,ffmpeg,jpeg,png,tiff,webp](uwp|(windows&(arm|arm64)))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Source: vcpkg-ci-paraview
|
||||
Version: 1
|
||||
Port-Version: 1
|
||||
Port-Version: 2
|
||||
Homepage: https://github.com/microsoft/vcpkg
|
||||
Description: Port to force features of certain ports within CI
|
||||
Build-Depends: paraview[vtkm, tools]
|
||||
Build-Depends: paraview[core,vtkm,tools](!(x86&windows)), paraview[core,tools](x86&windows)
|
||||
|
|
Loading…
Reference in a new issue