Skip to content

Commit

Permalink
Install deps
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed May 9, 2024
1 parent 6f6c688 commit 77076b1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1224,6 +1224,7 @@ endif()
# Enable packaging
if (WITH_CORE)
include(Bundle)
include(VcpkgInstallDeps)
endif()

if (UNIX AND NOT APPLE)
Expand Down
25 changes: 25 additions & 0 deletions cmake/VcpkgInstallDeps.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
if(NOT WITH_VCPKG)
return()
endif()

if(MSVC)
# At least python3.dll, qgis_analysis.dll and gsl.dll are missing
# Copy everything
file(GLOB ALL_LIBS
"${VCPKG_BASE_DIR}/bin/*.dll"
)
install(FILES ${ALL_LIBS} DESTINATION "bin")
endif()

set(PROJ_DATA_PATH "${VCPKG_BASE_DIR}/share/proj")

if(NOT EXISTS "${PROJ_DATA_PATH}/proj.db")
message(FATAL_ERROR "proj.db not found at ${PROJ_DATA_PATH}/proj.db")
endif()

install(DIRECTORY "${PROJ_DATA_PATH}/" DESTINATION "${CMAKE_INSTALL_DATADIR}/proj")
install(DIRECTORY "${VCPKG_BASE_DIR}/share/gdal/" DESTINATION "${CMAKE_INSTALL_DATADIR}/gdal")
install(DIRECTORY "${VCPKG_BASE_DIR}/bin/Qca/" DESTINATION "bin/Qca") # QCA plugins
install(DIRECTORY "${VCPKG_BASE_DIR}/tools/python3/"
DESTINATION "bin"
PATTERN "*.sip" EXCLUDE)

0 comments on commit 77076b1

Please sign in to comment.