Skip to content

Commit

Permalink
[OpenCV] fix compatibility with VTK9 (#12785)
Browse files Browse the repository at this point in the history
  • Loading branch information
cenit committed Dec 11, 2020
1 parent c2329ab commit e054fe2
Show file tree
Hide file tree
Showing 17 changed files with 1,124 additions and 79 deletions.
6 changes: 6 additions & 0 deletions ports/ceres/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ if(VCPKG_TARGET_IS_WINDOWS)
else()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib${LIB_SUFFIX}/cmake/Ceres)
endif()
file(READ ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake CERES_CONFIG)
string(REPLACE "set_target_properties(ceres PROPERTIES INTERFACE_LINK_LIBRARIES Ceres::ceres)"
"set_target_properties(ceres PROPERTIES INTERFACE_LINK_LIBRARIES Ceres::ceres)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)" CERES_CONFIG "${CERES_CONFIG}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake "${CERES_CONFIG}")

vcpkg_copy_pdbs()

Expand Down
2 changes: 1 addition & 1 deletion ports/ceres/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ceres",
"version-string": "2.0.0",
"port-version": 1,
"port-version": 2,
"description": "non-linear optimization package",
"homepage": "https://github.com/ceres-solver/ceres-solver",
"dependencies": [
Expand Down
6 changes: 1 addition & 5 deletions ports/opencv2/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: opencv2
Version: 2.4.13.7
Port-Version: 3
Port-Version: 4
Build-Depends: zlib
Description: computer vision library, version 2
Default-Features: eigen, jpeg, opengl, png, tiff
Expand Down Expand Up @@ -45,9 +45,5 @@ Feature: tiff
Build-Depends: tiff
Description: TIFF support for opencv

Feature: vtk
Build-Depends: vtk
Description: vtk support for opencv

Feature: world
Description: Compile to a single package support for opencv
12 changes: 0 additions & 12 deletions ports/opencv2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,11 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"world" BUILD_opencv_world
)

set(WITH_VTK OFF)
if("vtk" IN_LIST FEATURES)
set(WITH_VTK ON)
endif()

set(WITH_MSMF ON)
if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
set(WITH_MSMF OFF)
endif()

if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
if (WITH_VTK)
message(WARNING "VTK is currently unsupported in this build configuration, turning it off")
set(WITH_VTK OFF)
endif()
endif()

if("ffmpeg" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_UWP)
set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}")
Expand Down
Loading

0 comments on commit e054fe2

Please sign in to comment.