Skip to content
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
28 changes: 22 additions & 6 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
-DALICEVISION_USE_CUDA=ON \
-DALICEVISION_USE_CCTAG="${BUILD_CCTAG}" \
-DALICEVISION_USE_POPSIFT=ON \
-DALICEVISION_USE_ALEMBIC=ON \
-DALICEVISION_USE_ALEMBIC=ON \
-DOpenCV_DIR="${DEPS_INSTALL_DIR}/share/OpenCV" \
-DALICEVISION_USE_OPENGV=ON \
-DCeres_DIR="${DEPS_INSTALL_DIR}/share/Ceres" \
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
meshroom_avBranch=$(git ls-remote --heads https://github.com/alicevision/Meshroom.git $GITHUB_HEAD_REF | cut -f 1)
if [ $meshroom_avBranch != "" ]; then git checkout $meshroom_avBranch; echo "Use Meshroom/$GITHUB_HEAD_REF"; fi
export MESHROOM_INSTALL_DIR=$PWD
export PYTHONPATH=$PWD:${ALICEVISION_ROOT}:${PYTHONPATH}
export PYTHONPATH=$PWD:${ALICEVISION_ROOT}/bin:${PYTHONPATH}
export PATH=$PATH:${ALICEVISION_ROOT}/bin
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
mkdir ./outputData
Expand All @@ -121,7 +121,7 @@ jobs:
cd SfM_quality_evaluation/
# checkout a specific commit to ensure repeatability
git checkout 36e3bf2d05c64d1726cb4a0e770923794f203f98
export PYTHONPATH=${ALICEVISION_ROOT}:${PYTHONPATH}
export PYTHONPATH=${ALICEVISION_ROOT}/bin:${PYTHONPATH}
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
echo "ldd aliceVision_cameraInit"
ldd ${ALICEVISION_ROOT}/bin/aliceVision_cameraInit
Expand All @@ -130,7 +130,7 @@ jobs:

- name: Python Binding - Unit Tests
run: |
export PYTHONPATH=${ALICEVISION_ROOT}:${PYTHONPATH}
export PYTHONPATH=${ALICEVISION_ROOT}/bin:${PYTHONPATH}
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
pip3 install pytest
pytest ./pyTests
Expand All @@ -146,6 +146,7 @@ jobs:
CTEST_OUTPUT_ON_FAILURE: 1
ALICEVISION_ROOT: '${{ github.workspace }}/install'
VCPKG_ROOT: '${{ github.workspace}}\..\vcpkg'
PYTHONPATH: '${{ github.workspace }}/install/bundle/bin'
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -227,13 +228,28 @@ jobs:
-DALICEVISION_USE_OPENGV=OFF
-DALICEVISION_BUILD_PHOTOMETRICSTEREO=OFF
-DALICEVISION_BUILD_SEGMENTATION=OFF
-DALICEVISION_BUILD_SWIG_BINDING=ON
-DBOOST_NO_CXX11=ON

# This input tells run-cmake to consume the vcpkg.cmake toolchain file set by run-vcpkg.
cmakeBuildType: Release
buildWithCMake: true

- name: UnitTests
- name: Bundle
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
buildDirectory: ${{ env.buildDir }}
buildWithCMakeArgs: '--config Release --target bundle'
cmakeAppendedArgs: -DCMAKE_INSTALL_PREFIX:PATH=${{ env.ALICEVISION_ROOT }}
cmakeBuildType: Release
buildWithCMake: true

- name: Python Binding - Unit Tests
run: |
${{ env.VCPKG_ROOT }}\installed\x64-windows\tools\python3\python -m pytest ./pyTests

- name: Unit Tests
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.14)
project(aliceVision LANGUAGES C CXX)

option(ALICEVISION_BUILD_DEPENDENCIES "Build all AliceVision dependencies" OFF)
Expand Down
6 changes: 3 additions & 3 deletions pyTests/sfmData/test_sfmdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def test_sfmdata_get_set_folders():
data.getRelativeMatchesFolders()[0] == relative_folder

# Add single features and matches folders
other_folder = "../other"
other_folder = os.path.join("..", "other")
data.addFeaturesFolder(other_folder)
data.addMatchesFolder(other_folder)
assert len(data.getFeaturesFolders()) == 2, \
Expand All @@ -354,8 +354,8 @@ def test_sfmdata_get_set_folders():
assert os.path.relpath(data.getMatchesFolders()[1], projectFolder) == other_folder

# Reset features and matches folders and add new ones
new_folder1 = "../new"
new_folder2 = "../.."
new_folder1 = os.path.join("..", "new")
new_folder2 = os.path.join("..", "..")
new_folder3 = "folder"
new_folders = [new_folder1, new_folder2, new_folder3]

Expand Down
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,9 @@ endif()
if(ALICEVISION_BUILD_SWIG_BINDING)
find_package(SWIG REQUIRED) # SWIG dependency
if(SWIG_FOUND)
# Remove CMake warnings related to SWIG old policies
cmake_policy(SET CMP0078 NEW) # Use the specified module name for the target's name
cmake_policy(SET CMP0086 NEW) # Use "-module {name}" when the module name has been set with SWIG_MODULE_NAME
include(UseSWIG)
message(STATUS "SWIG found.")
else()
Expand Down
56 changes: 10 additions & 46 deletions src/aliceVision/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,53 +82,17 @@ if (ALICEVISION_BUILD_PHOTOMETRICSTEREO)
endif()


if(ALICEVISION_BUILD_SWIG_BINDING)
set(UseSWIG_TARGET_NAME_PREFERENCE STANDARD)
set_property(SOURCE aliceVision.i PROPERTY CPLUSPLUS ON)
set_property(SOURCE aliceVision.i PROPERTY SWIG_MODULE_NAME pyalicevision)

swig_add_library(pyalicevision
TYPE MODULE
LANGUAGE python
if (ALICEVISION_BUILD_SWIG_BINDING)
alicevision_swig_add_library(pyalicevision
SOURCES aliceVision.i
)

set_property(
TARGET pyalicevision
PROPERTY SWIG_COMPILE_OPTIONS -doxygen
)

target_include_directories(pyalicevision
PRIVATE
../include
${ALICEVISION_ROOT}/include
${Python3_INCLUDE_DIRS}
${Python3_NumPy_INCLUDE_DIRS}
)
set_property(
TARGET pyalicevision
PROPERTY SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON
)
set_property(
TARGET pyalicevision
PROPERTY COMPILE_OPTIONS -std=c++20
)

target_link_libraries(pyalicevision
PUBLIC
aliceVision_numeric
)
install(
TARGETS
pyalicevision
DESTINATION
${CMAKE_INSTALL_PREFIX}
)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/pyalicevision.py
DESTINATION
${CMAKE_INSTALL_PREFIX}
PUBLIC_LINKS
aliceVision_numeric
${Python3_LIBRARIES}
PRIVATE_INCLUDE_DIRS
../include
${ALICEVISION_ROOT}/include
${Python3_INCLUDE_DIRS}
${Python3_NumPy_INCLUDE_DIRS}
)
endif()

Expand Down
55 changes: 9 additions & 46 deletions src/aliceVision/camera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,52 +61,15 @@ alicevision_add_test(equidistant_test.cpp NAME "camera_equidistant"

# SWIG Binding
if (ALICEVISION_BUILD_SWIG_BINDING)
set(UseSWIG_TARGET_NAME_PREFERENCE STANDARD)
set_property(SOURCE Camera.i PROPERTY CPLUSPLUS ON)
set_property(SOURCE Camera.i PROPERTY SWIG_MODULE_NAME camera)

swig_add_library(camera
TYPE MODULE
LANGUAGE python
alicevision_swig_add_library(camera
SOURCES Camera.i
)

set_property(
TARGET camera
PROPERTY SWIG_COMPILE_OPTIONS -doxygen
)

target_include_directories(camera
PRIVATE
../include
${ALICEVISION_ROOT}/include
${Python3_INCLUDE_DIRS}
${Python3_NumPy_INCLUDE_DIRS}
)
set_property(
TARGET camera
PROPERTY SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON
)
set_property(
TARGET camera
PROPERTY COMPILE_OPTIONS -std=c++20
)

target_link_libraries(camera
PUBLIC
aliceVision_camera
)

install(
TARGETS
camera
DESTINATION
${CMAKE_INSTALL_PREFIX}
)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/camera.py
DESTINATION
${CMAKE_INSTALL_PREFIX}
PUBLIC_LINKS
aliceVision_camera
${Python3_LIBRARIES}
PRIVATE_INCLUDE_DIRS
../include
${ALICEVISION_ROOT}/include
${Python3_INCLUDE_DIRS}
${Python3_NumPy_INCLUDE_DIRS}
)
endif()
55 changes: 9 additions & 46 deletions src/aliceVision/geometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,52 +38,15 @@ alicevision_add_test(frustumIntersection_test.cpp

# SWIG Binding
if (ALICEVISION_BUILD_SWIG_BINDING)
set(UseSWIG_TARGET_NAME_PREFERENCE STANDARD)
set_property(SOURCE Geometry.i PROPERTY CPLUSPLUS ON)
set_property(SOURCE Geometry.i PROPERTY SWIG_MODULE_NAME geometry)

swig_add_library(geometry
TYPE MODULE
LANGUAGE python
alicevision_swig_add_library(geometry
SOURCES Geometry.i
)

set_property(
TARGET geometry
PROPERTY SWIG_COMPILE_OPTIONS -doxygen
)

target_include_directories(geometry
PRIVATE
../include
${ALICEVISION_ROOT}/include
${Python3_INCLUDE_DIRS}
${Python3_NumPy_INCLUDE_DIRS}
)
set_property(
TARGET geometry
PROPERTY SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON
)
set_property(
TARGET geometry
PROPERTY COMPILE_OPTIONS -std=c++20
)

target_link_libraries(geometry
PUBLIC
aliceVision_geometry
)

install(
TARGETS
geometry
DESTINATION
${CMAKE_INSTALL_PREFIX}
)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/geometry.py
DESTINATION
${CMAKE_INSTALL_PREFIX}
PUBLIC_LINKS
aliceVision_geometry
${Python3_LIBRARIES}
PRIVATE_INCLUDE_DIRS
../include
${ALICEVISION_ROOT}/include
${Python3_INCLUDE_DIRS}
${Python3_NumPy_INCLUDE_DIRS}
)
endif()
10 changes: 9 additions & 1 deletion src/aliceVision/global.i
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@
%}

%inline %{
typedef long unsigned int size_t;
typedef uint32_t IndexT;
%}

#ifdef LINUXPLATFORM
%inline %{
typedef long unsigned int size_t;
%}
#else
%inline %{
typedef unsigned long long size_t;
%}
#endif

%template(IntVector) std::vector<int>;
%template(DoubleVector) std::vector<double>;
Expand Down
63 changes: 13 additions & 50 deletions src/aliceVision/hdr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,56 +51,19 @@ alicevision_add_test(hdrLaguerre_test.cpp

# SWIG Binding
if (ALICEVISION_BUILD_SWIG_BINDING)
set(UseSWIG_TARGET_NAME_PREFERENCE STANDARD)
set_property(SOURCE Hdr.i PROPERTY CPLUSPLUS ON)
set_property(SOURCE Hdr.i PROPERTY SWIG_MODULE_NAME hdr)

swig_add_library(hdr
TYPE MODULE
LANGUAGE python
alicevision_swig_add_library(hdr
SOURCES Hdr.i
)

set_property(
TARGET hdr
PROPERTY SWIG_COMPILE_OPTIONS -doxygen
)

target_include_directories(hdr
PRIVATE
../include
${ALICEVISION_ROOT}/include
${Python3_INCLUDE_DIRS}
${Python3_NumPy_INCLUDE_DIRS}
)
set_property(
TARGET hdr
PROPERTY SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON
)
set_property(
TARGET hdr
PROPERTY COMPILE_OPTIONS -std=c++20
)

target_link_libraries(hdr
PUBLIC
aliceVision_hdr
aliceVision_system
aliceVision_numeric
aliceVision_image
aliceVision_sfmData
)

install(
TARGETS
hdr
DESTINATION
${CMAKE_INSTALL_PREFIX}
)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/hdr.py
DESTINATION
${CMAKE_INSTALL_PREFIX}
PUBLIC_LINKS
aliceVision_hdr
aliceVision_system
aliceVision_numeric
aliceVision_image
aliceVision_sfmData
${Python3_LIBRARIES}
PRIVATE_INCLUDE_DIRS
../include
${ALICEVISION_ROOT}/include
${Python3_INCLUDE_DIRS}
${Python3_NumPy_INCLUDE_DIRS}
)
endif()
Loading
Loading