-
-
Notifications
You must be signed in to change notification settings - Fork 830
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
[dep] add PCL as dependency #1258
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
dca0e18
[cmake] added build script for pcl and its dependencies
simogasp c9e85b3
[doc] update doc for pcl dependency
simogasp 8f58783
[ci] enable vcpkg to build pcl
simogasp d71ba5e
[cmake] just formatting
simogasp 02dffb7
[cmake] optionally enable cuda for pcl
simogasp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -22,6 +22,7 @@ option(AV_BUILD_FFMPEG "Enable building an embedded FFMpeg" ON) | |||||
option(AV_BUILD_COINUTILS "Enable building an embedded CoinUtils" ON) | ||||||
option(AV_BUILD_OSI "Enable building an embedded Osi" ON) | ||||||
option(AV_BUILD_CLP "Enable building an embedded Clp" ON) | ||||||
option(AV_BUILD_PCL "Enable building an embedded PointCloud library" ON) | ||||||
option(AV_BUILD_ALICEVISION "Enable building of AliceVision" ON) | ||||||
option(AV_EIGEN_MEMORY_ALIGNMENT "Enable Eigen memory alignment" OFF) | ||||||
|
||||||
|
@@ -77,6 +78,7 @@ message(STATUS "AV_BUILD_FFMPEG: ${AV_BUILD_FFMPEG}") | |||||
message(STATUS "AV_BUILD_COINUTILS: ${AV_BUILD_COINUTILS}") | ||||||
message(STATUS "AV_BUILD_OSI: ${AV_BUILD_OSI}") | ||||||
message(STATUS "AV_BUILD_CLP: ${AV_BUILD_CLP}") | ||||||
message(STATUS "AV_BUILD_PCL: ${AV_BUILD_PCL}") | ||||||
message(STATUS "AV_BUILD_DEPENDENCIES_PARALLEL: ${AV_BUILD_DEPENDENCIES_PARALLEL}") | ||||||
message(STATUS "") | ||||||
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") | ||||||
|
@@ -864,6 +866,81 @@ ExternalProject_Add(${CLP_TARGET} | |||||
set(CLP_CMAKE_FLAGS -DClp_DIR:PATH=${CMAKE_INSTALL_PREFIX}/share/clp) | ||||||
endif() | ||||||
|
||||||
# Add PCL | ||||||
if(AV_BUILD_PCL) | ||||||
# build other dependencies for pcl | ||||||
# add lz4 for flann | ||||||
set(LZ4_TARGET lz4) | ||||||
ExternalProject_Add(${LZ4_TARGET} | ||||||
GIT_REPOSITORY https://github.com/alicevision/lz4 | ||||||
GIT_TAG 47a530e8a8c945ad3bb809e2ce4591a56c5081e2 | ||||||
PREFIX ${BUILD_DIR} | ||||||
BUILD_IN_SOURCE 0 | ||||||
BUILD_ALWAYS 0 | ||||||
UPDATE_COMMAND "" | ||||||
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/${LZ4_TARGET} | ||||||
BINARY_DIR ${BUILD_DIR}/${LZ4_TARGET}_build | ||||||
INSTALL_DIR ${CMAKE_INSTALL_PREFIX} | ||||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} ${CMAKE_CORE_BUILD_FLAGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> <SOURCE_DIR> | ||||||
BUILD_COMMAND $(MAKE) -j${AV_BUILD_DEPENDENCIES_PARALLEL} | ||||||
) | ||||||
set(LZ4_CMAKE_FLAGS -Dlz4_DIR:PATH=${CMAKE_INSTALL_PREFIX}/lib/cmake/lz4/) | ||||||
|
||||||
# @TODO whenever flann will be removed as embedded dependency move this and lz4 out from if(AV_BUILD_PCL) as they will be needed by the library | ||||||
# add flann | ||||||
set(FLANN_TARGET flann) | ||||||
ExternalProject_Add(${FLANN_TARGET} | ||||||
GIT_REPOSITORY https://github.com/alicevision/flann | ||||||
GIT_TAG 9e79ca6881b779fb842e83c17aef1f4c816ce058 | ||||||
PREFIX ${BUILD_DIR} | ||||||
BUILD_IN_SOURCE 0 | ||||||
BUILD_ALWAYS 0 | ||||||
UPDATE_COMMAND "" | ||||||
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/${FLANN_TARGET} | ||||||
BINARY_DIR ${BUILD_DIR}/${FLANN_TARGET}_build | ||||||
INSTALL_DIR ${CMAKE_INSTALL_PREFIX} | ||||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} ${CMAKE_CORE_BUILD_FLAGS} | ||||||
-DBUILD_C_BINDINGS:BOOL=OFF | ||||||
-DBUILD_EXAMPLES=OFF | ||||||
-DBUILD_TESTS:BOOL=OFF | ||||||
-DBUILD_DOC:BOOL=OFF | ||||||
-DBUILD_PYTHON_BINDINGS:BOOL=OFF | ||||||
-DBUILD_MATLAB_BINDINGS:BOOL=OFF | ||||||
${LZ4_CMAKE_FLAGS} | ||||||
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> <SOURCE_DIR> | ||||||
BUILD_COMMAND $(MAKE) -j${AV_BUILD_DEPENDENCIES_PARALLEL} | ||||||
DEPENDS ${LZ4_TARGET} | ||||||
) | ||||||
set(FLANN_CMAKE_FLAGS -Dflann_DIR:PATH=${CMAKE_INSTALL_PREFIX}/lib/cmake/flann/) | ||||||
|
||||||
# add point cloud library | ||||||
set(PCL_TARGET pcl) | ||||||
ExternalProject_Add(${PCL_TARGET} | ||||||
URL https://github.com/PointCloudLibrary/pcl/archive/refs/tags/pcl-1.12.1.tar.gz | ||||||
URL_MD5 eb1be79330872f9674c9850bb35023bf | ||||||
DOWNLOAD_DIR ${BUILD_DIR}/download/${PCL_TARGET} | ||||||
PREFIX ${BUILD_DIR} | ||||||
BUILD_IN_SOURCE 0 | ||||||
BUILD_ALWAYS 0 | ||||||
UPDATE_COMMAND "" | ||||||
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/${PCL_TARGET} | ||||||
BINARY_DIR ${BUILD_DIR}/${PCL_TARGET}_build | ||||||
INSTALL_DIR ${CMAKE_INSTALL_PREFIX} | ||||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} ${CMAKE_CORE_BUILD_FLAGS} | ||||||
${EIGEN_CMAKE_FLAGS} | ||||||
${BOOST_CMAKE_FLAGS} | ||||||
${PNG_CMAKE_FLAGS} | ||||||
${CUDA_CMAKE_FLAGS} | ||||||
-DWITH_CUDA:BOOL=OFF | ||||||
${FLANN_CMAKE_FLAGS} | ||||||
${LZ4_CMAKE_FLAGS} | ||||||
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> <SOURCE_DIR> | ||||||
BUILD_COMMAND $(MAKE) -j${AV_BUILD_DEPENDENCIES_PARALLEL} | ||||||
DEPENDS ${FLANN_TARGET} ${LZ4_TARGET} ${EIGEN_TARGET} ${BOOST_TARGET} ${PNG_TARGET} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
) | ||||||
set(PCL_CMAKE_FLAGS -DPCL_DIR:PATH=${CMAKE_INSTALL_PREFIX}/share/pcl-1.12/) | ||||||
|
||||||
endif() | ||||||
|
||||||
set(AV_DEPS | ||||||
${ZLIB_TARGET} | ||||||
|
@@ -902,7 +979,7 @@ ExternalProject_Add(aliceVision | |||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src | ||||||
BINARY_DIR ${BUILD_DIR}/aliceVision_build | ||||||
INSTALL_DIR ${CMAKE_INSTALL_PREFIX} | ||||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_SHARED_LIBS:BOOL=ON -DTARGET_ARCHITECTURE=core -DALICEVISION_ROOT=${ALICEVISION_ROOT} -DALICEVISION_USE_ALEMBIC=ON -DMINIGLOG=ON -DALICEVISION_USE_CCTAG=${AV_BUILD_CCTAG} -DALICEVISION_USE_APRILTAG=${AV_BUILD_APRILTAG} -DALICEVISION_USE_OPENCV=${AV_BUILD_OPENCV} -DALICEVISION_USE_OPENGV=${AV_BUILD_OPENGV} -DALICEVISION_USE_POPSIFT=${AV_BUILD_POPSIFT} -DALICEVISION_USE_CUDA=${AV_USE_CUDA} -DALICEVISION_BUILD_DOC=OFF -DALICEVISION_BUILD_EXAMPLES=OFF ${ZLIB_CMAKE_FLAGS} ${ASSIMP_CMAKE_FLAGS} ${EIGEN_CMAKE_FLAGS} ${OPENIMAGEIO_CMAKE_FLAGS} ${OPENEXR_CMAKE_FLAGS} ${BOOST_CMAKE_FLAGS} ${ALEMBIC_CMAKE_FLAGS} ${GEOGRAM_CMAKE_FLAGS} ${LAPACK_CMAKE_FLAGS} ${CERES_CMAKE_FLAGS} ${CUDA_CMAKE_FLAGS} ${POPSIFT_CMAKE_FLAGS} ${OPENGV_CMAKE_FLAGS} ${OPENCV_CMAKE_FLAGS} ${CCTAG_CMAKE_FLAGS} ${APRILTAG_CMAKE_FLAGS} ${COINUTILS_CMAKE_FLAGS} ${OSI_CMAKE_FLAGS} ${CLP_CMAKE_FLAGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> <SOURCE_DIR> | ||||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_SHARED_LIBS:BOOL=ON -DTARGET_ARCHITECTURE=core -DALICEVISION_ROOT=${ALICEVISION_ROOT} -DALICEVISION_USE_ALEMBIC=ON -DMINIGLOG=ON -DALICEVISION_USE_CCTAG=${AV_BUILD_CCTAG} -DALICEVISION_USE_APRILTAG=${AV_BUILD_APRILTAG} -DALICEVISION_USE_OPENCV=${AV_BUILD_OPENCV} -DALICEVISION_USE_OPENGV=${AV_BUILD_OPENGV} -DALICEVISION_USE_POPSIFT=${AV_BUILD_POPSIFT} -DALICEVISION_USE_CUDA=${AV_USE_CUDA} -DALICEVISION_BUILD_DOC=OFF -DALICEVISION_BUILD_EXAMPLES=OFF ${ZLIB_CMAKE_FLAGS} ${ASSIMP_CMAKE_FLAGS} ${EIGEN_CMAKE_FLAGS} ${OPENIMAGEIO_CMAKE_FLAGS} ${OPENEXR_CMAKE_FLAGS} ${BOOST_CMAKE_FLAGS} ${ALEMBIC_CMAKE_FLAGS} ${GEOGRAM_CMAKE_FLAGS} ${LAPACK_CMAKE_FLAGS} ${CERES_CMAKE_FLAGS} ${CUDA_CMAKE_FLAGS} ${POPSIFT_CMAKE_FLAGS} ${OPENGV_CMAKE_FLAGS} ${OPENCV_CMAKE_FLAGS} ${CCTAG_CMAKE_FLAGS} ${APRILTAG_CMAKE_FLAGS} ${COINUTILS_CMAKE_FLAGS} ${OSI_CMAKE_FLAGS} ${CLP_CMAKE_FLAGS} ${LZ4_CMAKE_FLAGS} ${FLANN_CMAKE_FLAGS} ${PCL_CMAKE_FLAGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> <SOURCE_DIR> | ||||||
fabiencastan marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
DEPENDS ${AV_DEPS} | ||||||
) | ||||||
endif() | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with or without cuda?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not required for the registration module in pcl, that's why I set it to off.
I can put
so that it is coherent with rest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point was just that you added
${CUDA_CMAKE_FLAGS}
which does not make sense if you disable cuda usage.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But yes, if we enable it as it's done now, that makes sense.