Skip to content

Commit d073ff2

Browse files
authored
Update CMakeLists.txt
Add ZLIB to target link libs
1 parent f243663 commit d073ff2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,17 @@ target_link_libraries(uchmviewer
122122
)
123123

124124
#
125-
# NEED_BZIP2_ARCHIVE is set by the vcpkg portfile.cmake file. If set, we need to pick up the bzip2
126-
# archive as libzip will have been built as an archive not a .so/.dylib
125+
# IS_VCPKG_BUILD is set by the vcpkg portfile.cmake file. If set, we need to pick up the
126+
# archive files for:
127+
# bzip2
128+
# zlib
129+
# as libzip will have been built as an archive not a .so/.dylib
127130
#
128-
if (NEED_BZIP2_ARCHIVE)
129-
target_link_libraries(uchmviewer BZip2::BZip2)
131+
if (IS_VCPKG_BUILD)
132+
target_link_libraries(uchmviewer
133+
BZip2::BZip2
134+
ZLIB::ZLIB
135+
)
130136
endif ()
131137

132138
target_link_libraries(uchmviewer i18n)

0 commit comments

Comments
 (0)