Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ option(USE_STATIC_CHMLIB "Use static link with chm library" OFF)
option(USE_DEPLOY_RUNTIME "Copy runtime dependencies for deployment" OFF)
option(USE_GETTEXT "Use GNU Gettext for translation" ON)
option(USE_MACOS_BUNDLE "Install as macOS bundle" ON)
option(IS_VCPKG_BUILD "Running under vcpkg" OFF)
use_in(USE_DBUS "Use D-Bus integration" "Linux")
use_in(USE_MAC_APP "Use derived QApplication" "Darwin")

Expand Down Expand Up @@ -100,6 +101,18 @@ if (${USE_KF5})
target_compile_definitions(extra INTERFACE USE_KDE)
endif ()

#
# IS_VCPKG_BUILD is set by the vcpkg portfile.cmake file. If set, we need to pick up the
# archive files for:
# bzip2
# zlib
# as libzip will have been built as an archive not a .so/.dylib
#
if (IS_VCPKG_BUILD)
find_package(BZip2 REQUIRED)
find_package(ZLIB 1.1.2 REQUIRED)
endif ()

include(cmake/qt-aliases.cmake)
include(cmake/install-helper.cmake)

Expand Down
14 changes: 14 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,20 @@ target_link_libraries(uchmviewer
Qt::Xml
)

#
# IS_VCPKG_BUILD is set by the vcpkg portfile.cmake file. If set, we need to pick up the
# archive files for:
# bzip2
# zlib
# as libzip will have been built as an archive not a .so/.dylib
#
if (IS_VCPKG_BUILD)
target_link_libraries(uchmviewer
BZip2::BZip2
ZLIB::ZLIB
)
endif ()

target_link_libraries(uchmviewer i18n)
# For Gettext to work correctly, we tell the application the location
# of the folders with binaries and translations.
Expand Down