Skip to content

Commit

Permalink
Merge pull request #59217 from m-kuhn/local_build_fixes
Browse files Browse the repository at this point in the history
Find sip-build with vcpkg
  • Loading branch information
m-kuhn authored Oct 25, 2024
2 parents ef68425 + 20da4d8 commit bd73140
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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

0 comments on commit bd73140

Please sign in to comment.