Skip to content

Commit

Permalink
add build flann externalproject
Browse files Browse the repository at this point in the history
  • Loading branch information
servantftechnicolor committed Jul 26, 2023
1 parent 7d4bafc commit e513715
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ option(AV_BUILD_VPX "Enable building an embedded libvpx required for 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_FLANN "Enable building an embedded Flann" ON)
option(AV_BUILD_PCL "Enable building an embedded PointCloud library" ON)
option(AV_BUILD_USD "Enable building an embedded USD library" OFF)
option(AV_BUILD_ALICEVISION "Enable building of AliceVision" ON)
Expand Down Expand Up @@ -976,9 +977,7 @@ 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
if(AV_BUILD_FLANN)
# add lz4 for flann
set(LZ4_TARGET lz4)
ExternalProject_Add(${LZ4_TARGET}
Expand All @@ -998,12 +997,10 @@ if(AV_BUILD_PCL)
)
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
GIT_TAG 46e72429ef60ce9c413fa926ac7729f8dee96395
PREFIX ${BUILD_DIR}
BUILD_IN_SOURCE 0
BUILD_ALWAYS 0
Expand All @@ -1025,6 +1022,10 @@ if(AV_BUILD_PCL)
)
set(FLANN_CMAKE_FLAGS -Dflann_DIR:PATH=${CMAKE_INSTALL_PREFIX}/lib/cmake/flann/)

endif()

# Add PCL
if(AV_BUILD_PCL)
# add point cloud library
set(PCL_TARGET pcl)
ExternalProject_Add(${PCL_TARGET}
Expand Down

0 comments on commit e513715

Please sign in to comment.