Skip to content

Commit fba70f7

Browse files
committed
Merge pull request opencv#19515 from zchrissirhcz:3.4-fix-mislinked-zlib-in-vcpkg-by-adjust-link-order
2 parents 6ee23c9 + 84a2900 commit fba70f7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/imgcodecs/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ if(HAVE_WINRT_CX AND NOT WINRT)
1313
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW")
1414
endif()
1515

16-
if(HAVE_PNG OR HAVE_TIFF OR HAVE_OPENEXR)
17-
ocv_include_directories(${ZLIB_INCLUDE_DIRS})
18-
list(APPEND GRFMT_LIBS ${ZLIB_LIBRARIES})
19-
endif()
20-
2116
if(HAVE_JPEG)
2217
ocv_include_directories(${JPEG_INCLUDE_DIR} ${${JPEG_LIBRARY}_BINARY_DIR})
2318
list(APPEND GRFMT_LIBS ${JPEG_LIBRARIES})
@@ -58,6 +53,11 @@ if(HAVE_OPENEXR)
5853
list(APPEND GRFMT_LIBS ${OPENEXR_LIBRARIES})
5954
endif()
6055

56+
if(HAVE_PNG OR HAVE_TIFF OR HAVE_OPENEXR)
57+
ocv_include_directories(${ZLIB_INCLUDE_DIRS})
58+
list(APPEND GRFMT_LIBS ${ZLIB_LIBRARIES})
59+
endif()
60+
6161
if(HAVE_GDAL)
6262
include_directories(SYSTEM ${GDAL_INCLUDE_DIR})
6363
list(APPEND GRFMT_LIBS ${GDAL_LIBRARY})

0 commit comments

Comments
 (0)