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

[alicevision] Add new port #38034

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
13 changes: 13 additions & 0 deletions ports/alicevision/fix-dynamic-boost.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8fcdd67..566890c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -288,7 +288,7 @@ else()
endif()


-if(WIN32)
+if(OFF)
# Disable BOOST autolink
add_definitions(-DBOOST_ALL_NO_LIB)

72 changes: 72 additions & 0 deletions ports/alicevision/portfile.cmake
WangWeiLin-MV marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO alicevision/AliceVision
REF "v${VERSION}"
SHA512 448e20b2bb6623034ab89ea56b0c7fdf09af34d7d0d47740590fa9cd9aa2b6864f3950c4e968d260c660a41a2f5877c10edf8cfd0dcdd18e58ce289b7336e9ec
HEAD_REF master
PATCHES fix-dynamic-boost.patch
WangWeiLin-MV marked this conversation as resolved.
Show resolved Hide resolved
)

vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
sfm ALICEVISION_BUILD_SFM
openmp ALICEVISION_USE_OPENMP
)

# MeshSDFilter
vcpkg_from_github(
OUT_SOURCE_PATH MESHSDFILTER_SOURCE_PATH
REPO bldeng/MeshSDFilter
REF 71c3028eda6fc29517e658c54833e280f9abad51
SHA512 61367aab7117922b6f0f56d58e95cd328ac8177b184add11530b2ce9a8474be4947c7b27de135d7ad2980d6d49cc8a44b066eb673784dd553e1b9e78e994b3bb
HEAD_REF master
)

file(REMOVE_RECURSE "${SOURCE_PATH}/src/dependencies/MeshSDFilter")
file(RENAME "${MESHSDFILTER_SOURCE_PATH}" "${SOURCE_PATH}/src/dependencies/MeshSDFilter")

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DALICEVISION_BUILD_MVS=ON
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This on the other hand can be ON or OFF depending on the availability of CUDA (related to ALICEVISION_USE_CUDA) and GPU on the machine. Maybe we can leave it as a documentation note, the user might be able to build but not to execute without an NVidia card

-DALICEVISION_BUILD_HDR=ON
-DALICEVISION_BUILD_SEGMENTATION=ON
-DALICEVISION_BUILD_STEREOPHOTOMETRY=ON
-DALICEVISION_BUILD_PANORAMA=ON
-DALICEVISION_BUILD_SOFTWARE=ON
-DALICEVISION_BUILD_COVERAGE=OFF
-DALICEVISION_BUILD_DOC=OFF
-DALICEVISION_USE_CCTAG=OFF
-DALICEVISION_USE_APRILTAG=OFF
-DALICEVISION_USE_POPSIFT=OFF
-DALICEVISION_USE_OPENGV=OFF
-DALICEVISION_USE_ALEMBIC=OFF
-DALICEVISION_USE_UNCERTAINTYTE=OFF
-DALICEVISION_USE_ONNX=OFF
-DALICEVISION_USE_ONNX_GPU=OFF
-DALICEVISION_USE_CUDA=OFF
-DALICEVISION_USE_NVTX_PROFILING=OFF
-DALICEVISION_NVCC_WARNINGS=OFF
-DALICEVISION_USE_OPENCV=OFF
-DALICEVISION_USE_OPENCV_CONTRIB=OFF
-DALICEVISION_USE_OCVSIFT=OFF
-DALICEVISION_USE_MESHSDFILTER=ON
-DALICEVISION_REQUIRE_CERES_WITH_SUITESPARSE=ON
-DALICEVISION_USE_RPATH=ON
-DALICEVISION_BUILD_TESTS=OFF
-DBOOST_NO_CXX11=OFF
)

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(PACKAGE_NAME AliceVision CONFIG_PATH share/aliceVision/cmake)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
vcpkg_cmake_config_fixup(PACKAGE_NAME AliceVision CONFIG_PATH share/aliceVision/cmake)
vcpkg_cmake_config_fixup(CONFIG_PATH share/aliceVision/cmake)


file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/include/aliceVision/image/image_test"
"${CURRENT_PACKAGES_DIR}/include/aliceVision/image/share"
"${CURRENT_PACKAGES_DIR}/include/aliceVision/sfmDataIO/compatibilityData"
"${CURRENT_PACKAGES_DIR}/debug/share")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.md")
76 changes: 76 additions & 0 deletions ports/alicevision/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"name": "alicevision",
"version-semver": "3.2.0",
"description": "AliceVision is a Photogrammetric Computer Vision Framework which provides a 3D Reconstruction and Camera Tracking algorithms.",
"homepage": "https://alicevision.org/association/#",
"license": "MIT",
"supports": "!arm",
"dependencies": [
"boost-atomic",
"boost-container",
"boost-date-time",
"boost-filesystem",
"boost-graph",
"boost-json",
"boost-log",
"boost-program-options",
"boost-regex",
"boost-serialization",
"boost-system",
"boost-thread",
"boost-timer",
"eigen3",
"expat",
"nanoflann",
"openexr",
"openimageio",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"default-features": [
"openmp",
"sfm"
],
"features": {
"openmp": {
"description": "Enable OpenMP parallelization"
},
"sfm": {
"description": "Build AliceVision SfM part",
"dependencies": [
{
"name": "assimp",
"default-features": false
},
{
"name": "ceres",
"default-features": false,
"features": [
"suitesparse"
]
},
"coin-or-clp",
"coin-or-osi",
{
"name": "coinutils",
"default-features": false
},
{
"name": "flann",
"default-features": false
},
{
"name": "geogram",
"default-features": false
},
"liblemon"
]
}
}
}
9 changes: 9 additions & 0 deletions versions/a-/alicevision.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [

Check failure on line 2 in versions/a-/alicevision.json

View check run for this annotation

Azure Pipelines / microsoft.vcpkg.pr (x86_windows)

versions/a-/alicevision.json#L2

versions/a-/alicevision.json(2,): error : while parsing versions for alicevision from version/a-/alicevision.json

Check failure on line 2 in versions/a-/alicevision.json

View check run for this annotation

Azure Pipelines / microsoft.vcpkg.pr

versions/a-/alicevision.json#L2

versions/a-/alicevision.json(2,): error : while parsing versions for alicevision from version/a-/alicevision.json
{
"git-tree": "1791a747fcf5de693c34680819cbe19604f06d30",
"version-semver": "3.2.0",
"port-version": 0
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
"baseline": "1.8.6",
"port-version": 0
},
"alicevision": {
"baseline": "3.2.0",
"port-version": 0
},
"aliyun-oss-c-sdk": {
"baseline": "3.10.1",
"port-version": 0
Expand Down
Loading