Skip to content

Commit

Permalink
Copy srs.db from host
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and nirvn committed Feb 25, 2024
1 parent c89a8bc commit a236dc4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions vcpkg/ports/qgis-qt6/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ list(APPEND QGIS_OPTIONS "-DFLEX_EXECUTABLE=${FLEX}")
list(APPEND QGIS_OPTIONS "-DQGIS_INCLUDE_SUBDIR=include/qgis")
list(APPEND QGIS_OPTIONS "-DBUILD_WITH_QT6=ON")
list(APPEND QGIS_OPTIONS "-DQGIS_MACAPP_FRAMEWORK=FALSE")
list(APPEND QGIS_OPTIONS "-DNATIVE_CRSSYNC_BIN=${CURRENT_HOST_INSTALLED_DIR}/tools/crssync")
list(APPEND QGIS_OPTIONS "-DQGIS_BIN_SUBDIR=tools")

if("opencl" IN_LIST FEATURES)
list(APPEND QGIS_OPTIONS -DUSE_OPENCL:BOOL=ON)
Expand Down Expand Up @@ -226,6 +224,11 @@ if(VCPKG_TARGET_IS_WINDOWS)
copy_path(svg share)
endif()

# crssync only runs when building natively. If we are cross-compiling, copy the srs.cb from the host installation.
if(HOST_TRIPLET STREQUAL TARGET_TRIPLET)
file(COPY "${CURRENT_HOST_INSTALLED_DIR}/share/qgis/resources/srs.db" "${CURRENT_PACKAGES_DIR}/share/qgis/resources/srs.db")
endif()

file(GLOB QGIS_CMAKE_PATH ${CURRENT_PACKAGES_DIR}/*.cmake)
if(QGIS_CMAKE_PATH)
file(COPY ${QGIS_CMAKE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/cmake/qgis)
Expand Down

0 comments on commit a236dc4

Please sign in to comment.