Skip to content

Commit

Permalink
[OpenCV] merge microsoft#6901 and microsoft#6812
Browse files Browse the repository at this point in the history
  • Loading branch information
cenit committed Jun 19, 2019
1 parent a3bf05d commit 4bef4ba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ports/opencv/0006-fix-missing-openjp2.patch
@@ -0,0 +1,16 @@
diff --git a/modules/imgcodecs/CMakeLists.txt b/modules/imgcodecs/CMakeLists.txt
index 434278c..0d8f4d8 100644
--- a/modules/imgcodecs/CMakeLists.txt
+++ b/modules/imgcodecs/CMakeLists.txt
@@ -36,6 +36,11 @@ if(HAVE_PNG)
endif()

if(HAVE_GDCM)
+ if (CMAKE_BUILD_TYPE STREQUAL "Release")
+ link_directories("${CURRENT_INSTALLED_DIR}/lib")
+ else()
+ link_directories("${CURRENT_INSTALLED_DIR}/debug/lib")
+ endif()
ocv_include_directories(${GDCM_INCLUDE_DIRS})
list(APPEND GRFMT_LIBS ${GDCM_LIBRARIES})
endif()
3 changes: 3 additions & 0 deletions ports/opencv/portfile.cmake
Expand Up @@ -18,6 +18,7 @@ vcpkg_from_github(
0003-force-package-requirements.patch
0004-use-constexpr.patch
0005-uniform-config-install-path.patch
0006-fix-missing-openjp2.patch
0007-use-external-ffmpeg.patch
0008-fix-error-c4576.patch
)
Expand Down Expand Up @@ -313,6 +314,7 @@ vcpkg_configure_cmake(
-DBUILD_WITH_DEBUG_INFO=ON
-DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT}
-DBUILD_JAVA=OFF
-DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR}
###### PROTOBUF
-DPROTOBUF_UPDATE_FILES=ON
###### PYLINT/FLAKE8
Expand All @@ -323,6 +325,7 @@ vcpkg_configure_cmake(
-DUPDATE_PROTO_FILES=${UPDATE_PROTO_FILES}
# CMAKE
-DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
# ENABLE
-DENABLE_CXX11=ON
###### OPENCV vars
Expand Down

0 comments on commit 4bef4ba

Please sign in to comment.