Skip to content

Commit

Permalink
Rely on modernized qtwebdav cmake configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Dec 25, 2024
1 parent 0047e59 commit 8983269
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 59 deletions.
15 changes: 3 additions & 12 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ endif()

find_package(SQLite3 REQUIRED)
find_package(ZXing REQUIRED)
find_package(QtWebDAV REQUIRED)

add_library(qfield_core STATIC ${QFIELD_CORE_SRCS} ${QFIELD_CORE_HDRS})

Expand Down Expand Up @@ -367,18 +368,8 @@ target_link_libraries(
GDAL::GDAL
SQLite::SQLite3
Qca::qca
libzip::zip)

find_library(QtWebDAV-LIBRARY QtWebDAV)
if(QtWebDAV-LIBRARY)
message(STATUS "Found QtWebDAV: ${QtWebDAV-LIBRARY}")
target_link_libraries(qfield_core PUBLIC ${QtWebDAV-LIBRARY})
else()
message(
FATAL_ERROR
"Fail to find QtWebDAV library, make sure it is present in CMAKE_PREFIX_PATH"
)
endif()
libzip::zip
QtWebDAV::QtWebDAV)

if(WITH_BLUETOOTH)
find_package(
Expand Down
12 changes: 5 additions & 7 deletions vcpkg/ports/qtwebdav/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO PikachuHy/QtWebDAV
REF 4739a0f09cd005b9584f740637882be41ec0f062
SHA512 1d9eed1765178e52b6e06db952d0e30b0caf6db4b78d2d5b9492a3a56f8dd17ff58d84726fa05d756e524751ac1718a77d2215e03957afb28ca2e4e444f1b912
REPO m-kuhn/QtWebDAV
REF 4587b7fd97d242f2d5a5533bb4e655390c8ba01e
SHA512 9356da96316878a3cbf10ac1b4bcd435c252dcec2ad0cb6e0545c8ef916ff9c1e7b7d5b3a9acafe66d9fa27c454c9c735722d59eab460b0c96f30fd038dfc9fc
HEAD_REF master
PATCHES
static.patch
)

list(APPEND QTWEBDAV_OPTIONS -DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR})
list(APPEND QTWEBDAV_OPTIONS -DBUILD_WITH_QT6=True)
if(VCPKG_CROSSCOMPILING)
list(APPEND QTWEBDAV_OPTIONS -DQT_VERSION_MAJOR=6)
list(APPEND QTWEBDAV_OPTIONS -DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR})
list(APPEND QTWEBDAV_OPTIONS -DQT_HOST_PATH_CMAKE_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share)
endif()

Expand Down
40 changes: 0 additions & 40 deletions vcpkg/ports/qtwebdav/static.patch

This file was deleted.

0 comments on commit 8983269

Please sign in to comment.