Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-3_40] Find sip-build with vcpkg #59229

Merged
merged 2 commits into from
Oct 26, 2024
Merged
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
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ set(SDK_PATH "" CACHE STRING "Build with VCPKG SDK")
if(NOT SDK_PATH STREQUAL "")
message(STATUS "Building with SDK -- ${SDK_PATH}")
set(CMAKE_TOOLCHAIN_FILE "${SDK_PATH}/scripts/buildsystems/vcpkg.cmake")
set(VCPKG_INSTALL_PREFIX "${SDK_PATH}/installed")
if(APPLE AND NOT VCPKG_TARGET_TRIPLET)
set(VCPKG_TARGET_TRIPLET "x64-osx-dynamic")
endif()
Expand All @@ -43,7 +44,7 @@ else()
endif()

if(WITH_VCPKG)
list(APPEND CMAKE_PROGRAM_PATH "${VCPKG_INSTALL_PREFIX}/${VCPKG_TARGET_TRIPLET}/")
list(APPEND CMAKE_PROGRAM_PATH "${VCPKG_INSTALL_PREFIX}/${VCPKG_TARGET_TRIPLET}/tools/python3/Scripts/")
set(PREFER_INTERNAL_LIBS FALSE)
else()
set(PREFER_INTERNAL_LIBS TRUE)
Expand Down Expand Up @@ -274,8 +275,8 @@ if(WITH_CORE)
endif()

# try to configure and build POLY2TRI support
set (WITH_INTERNAL_POLY2TRI PREFER_INTERNAL_LIBS CACHE BOOL "Determines whether POLY2TRI should be built from internal copy")
set (WITH_INTERNAL_MESHOPTIMIZER PREFER_INTERNAL_LIBS CACHE BOOL "Determines whether MESHOPTIMIZER should be built from internal copy")
set (WITH_INTERNAL_POLY2TRI ${PREFER_INTERNAL_LIBS} CACHE BOOL "Determines whether POLY2TRI should be built from internal copy")
set (WITH_INTERNAL_MESHOPTIMIZER ${PREFER_INTERNAL_LIBS} CACHE BOOL "Determines whether MESHOPTIMIZER should be built from internal copy")

# try to configure and build POSTGRESQL support
set (WITH_POSTGRESQL TRUE CACHE BOOL "Determines whether POSTGRESQL support should be built")
Expand Down Expand Up @@ -388,7 +389,7 @@ if(WITH_CORE)
find_package(EXPAT REQUIRED)
find_package(Spatialindex REQUIRED)
find_package(LibZip REQUIRED)
set (WITH_INTERNAL_NLOHMANN_JSON PREFER_INTERNAL_LIBS CACHE BOOL "Determines whether the vendored copy of nlohmann-json should be used")
set (WITH_INTERNAL_NLOHMANN_JSON ${PREFER_INTERNAL_LIBS} CACHE BOOL "Determines whether the vendored copy of nlohmann-json should be used")
find_package(nlohmann_json REQUIRED)

# The following bypasses the FindSQLite3 module introduced in CMake 3.14
Expand Down
2 changes: 1 addition & 1 deletion src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2350,7 +2350,7 @@ if(WITH_INTERNAL_MESHOPTIMIZER)
)
else()
find_package(meshoptimizer CONFIG REQUIRED)
target_link_libraries(qgis_core PRIVATE meshoptimizer::meshoptimizer)
target_link_libraries(qgis_core meshoptimizer::meshoptimizer)
endif()

# require c++17
Expand Down
Loading