mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-15 03:20:07 +08:00
[openmvg] Update to 1.5 (#10008)
This commit is contained in:
parent
be6d78f1e3
commit
dbe299e4a5
@ -1,5 +1,5 @@
|
||||
Source: openmvg
|
||||
Version: 1.4-7
|
||||
Version: 1.5
|
||||
Description: open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion.
|
||||
Build-Depends: coinutils, clp, osi, liblemon, flann, eigen3, ceres, cereal, libjpeg-turbo, tiff, libpng, zlib, suitesparse
|
||||
|
||||
|
@ -1,427 +1,421 @@
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 654bebd..ab7dd90 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -17,27 +17,16 @@ endif()
|
||||
# ==============================================================================
|
||||
# OpenMVG build options
|
||||
# ==============================================================================
|
||||
-option(OpenMVG_BUILD_SHARED "Build OpenMVG shared libs" OFF)
|
||||
-option(OpenMVG_BUILD_TESTS "Build OpenMVG tests" OFF)
|
||||
-option(OpenMVG_BUILD_DOC "Build OpenMVG documentation" ON)
|
||||
-option(OpenMVG_BUILD_EXAMPLES "Build OpenMVG samples applications." ON)
|
||||
-option(OpenMVG_BUILD_OPENGL_EXAMPLES "Build OpenMVG openGL examples" OFF)
|
||||
-option(OpenMVG_BUILD_SOFTWARES "Build OpenMVG softwares" ON)
|
||||
-option(OpenMVG_BUILD_GUI_SOFTWARES "Build OpenMVG GUI softwares (QT5)" ON)
|
||||
-option(OpenMVG_BUILD_COVERAGE "Enable code coverage generation (gcc only)" OFF)
|
||||
-option(OpenMVG_USE_OPENMP "Enable OpenMP parallelization" ON)
|
||||
# ==============================================================================
|
||||
# Opencv is not used by openMVG but some samples show how to use openCV
|
||||
# and openMVG simultaneously
|
||||
# ==============================================================================
|
||||
-option(OpenMVG_USE_OPENCV "Build or not opencv+openMVG samples programs" OFF)
|
||||
|
||||
# ==============================================================================
|
||||
# Since OpenCV 3, SIFT is no longer in the default modules. See
|
||||
# https://github.com/itseez/opencv_contrib for more informations.
|
||||
# Enable this to be able to use OpenCV SIFT in main_ComputeFeatures_OpenCV.
|
||||
# ==============================================================================
|
||||
-option(OpenMVG_USE_OCVSIFT "Add or not OpenCV SIFT in available features" OFF)
|
||||
|
||||
# ==============================================================================
|
||||
# OpenMVG version
|
||||
@@ -85,15 +74,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
register_definitions(-DOPENMVG_STD_UNORDERED_MAP)
|
||||
endif()
|
||||
|
||||
-# ==============================================================================
|
||||
-# Check that submodule have been initialized and updated
|
||||
-# ==============================================================================
|
||||
-if (NOT EXISTS ${PROJECT_SOURCE_DIR}/dependencies/cereal/include)
|
||||
- message(FATAL_ERROR
|
||||
- "\n submodule(s) are missing, please update your repository:\n"
|
||||
- " > git submodule update -i\n")
|
||||
-endif()
|
||||
-
|
||||
# ==============================================================================
|
||||
# Additional cmake find modules
|
||||
# ==============================================================================
|
||||
@@ -129,7 +109,6 @@ if (OpenMVG_USE_OPENMP)
|
||||
find_package(OpenMP)
|
||||
if (OPENMP_FOUND)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
- option(OpenMVG_USE_OPENMP "Use OpenMP for parallelization" ON)
|
||||
register_definitions(-DOPENMVG_USE_OPENMP)
|
||||
if (NOT MSVC)
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
@@ -140,11 +119,6 @@ if (OpenMVG_USE_OPENMP)
|
||||
endif()
|
||||
endif (NOT MSVC)
|
||||
endif (OPENMP_FOUND)
|
||||
-else (OpenMVG_USE_OPENMP)
|
||||
- option(OpenMVG_USE_OPENMP "Use OpenMP for parallelization" OFF)
|
||||
- include(UpdateCacheVariable)
|
||||
- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OPENMP OFF)
|
||||
- remove_definitions(-DOPENMVG_USE_OPENMP)
|
||||
endif (OpenMVG_USE_OPENMP)
|
||||
|
||||
# ==============================================================================
|
||||
@@ -183,14 +157,6 @@ if (OpenMVG_BUILD_OPENGL_EXAMPLES)
|
||||
set_property(TARGET glfw PROPERTY FOLDER OpenMVG/3rdParty/glfw)
|
||||
endif (OpenMVG_BUILD_OPENGL_EXAMPLES)
|
||||
|
||||
-# Dependencies install rules
|
||||
-install(
|
||||
- DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/
|
||||
- DESTINATION include/openMVG_dependencies
|
||||
- COMPONENT headers
|
||||
- FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h"
|
||||
-)
|
||||
-
|
||||
# ==============================================================================
|
||||
# --END-- SUBMODULE CONFIGURATION
|
||||
# ==============================================================================
|
||||
@@ -226,14 +192,8 @@ ENDMACRO(UNIT_TEST)
|
||||
# - external by default
|
||||
# - internal if cereal not found
|
||||
# ==============================================================================
|
||||
-find_package(cereal QUIET CONFIG)
|
||||
-if (NOT cereal_FOUND)
|
||||
- set(CEREAL_INCLUDE_DIRS
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/cereal/include)
|
||||
- set(OpenMVG_USE_INTERNAL_CEREAL ON)
|
||||
-else()
|
||||
- get_target_property(CEREAL_INCLUDE_DIRS cereal INTERFACE_INCLUDE_DIRECTORIES)
|
||||
-endif()
|
||||
+find_package(cereal REQUIRED CONFIG)
|
||||
+get_target_property(CEREAL_INCLUDE_DIRS cereal INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
# ==============================================================================
|
||||
# Eigen
|
||||
@@ -242,14 +202,8 @@ endif()
|
||||
# - external if EIGEN_INCLUDE_DIR_HINTS is defined
|
||||
# - internal if Eigen not found
|
||||
# ==============================================================================
|
||||
-find_package(eigen3 QUIET)
|
||||
-if (NOT eigen3_FOUND)
|
||||
- set(EIGEN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/eigen)
|
||||
- set(OpenMVG_USE_INTERNAL_EIGEN ON)
|
||||
- find_package(Eigen QUIET)
|
||||
-else()
|
||||
- set(EIGEN_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
|
||||
-endif()
|
||||
+find_package(Eigen3 REQUIRED)
|
||||
+set(EIGEN_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
|
||||
|
||||
# ==============================================================================
|
||||
# Ceres
|
||||
@@ -257,17 +211,7 @@ endif()
|
||||
# - external by default if CERES_DIR_HINTS or find_package found a valid Ceres
|
||||
# - internal if ceres not found (ceres-solver+cxsparse+miniglog)
|
||||
# ==============================================================================
|
||||
-find_package(Ceres QUIET HINTS ${CERES_DIR_HINTS})
|
||||
-if (NOT Ceres_FOUND)
|
||||
- set(OpenMVG_USE_INTERNAL_CERES ON)
|
||||
- set(CERES_INCLUDE_DIRS
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/ceres-solver/include
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/ceres-solver/internal/ceres/miniglog
|
||||
- ${PROJECT_BINARY_DIR}/third_party/ceres-solver/config)
|
||||
- FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/third_party/ceres-solver/VERSION" CERES_CONFIG)
|
||||
- STRING(REGEX REPLACE "version ([0-9.]+).*" "\\1" CERES_VERSION ${CERES_CONFIG})
|
||||
- set(CERES_LIBRARIES openMVG_ceres)
|
||||
-endif()
|
||||
+find_package(Ceres REQUIRED)
|
||||
|
||||
# ==============================================================================
|
||||
# Flann
|
||||
@@ -275,14 +219,7 @@ endif()
|
||||
# - internal by default (flann),
|
||||
# - external if FLANN_INCLUDE_DIR_HINTS and a valid Flann setup is found
|
||||
# ==============================================================================
|
||||
-if (NOT DEFINED FLANN_INCLUDE_DIR_HINTS)
|
||||
- set(FLANN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp)
|
||||
- set(OpenMVG_USE_INTERNAL_FLANN ON)
|
||||
-endif()
|
||||
-find_package(Flann QUIET)
|
||||
-if (NOT FLANN_FOUND OR OpenMVG_USE_INTERNAL_FLANN)
|
||||
- set(FLANN_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp)
|
||||
-endif()
|
||||
+find_package(flann REQUIRED)
|
||||
|
||||
# ==============================================================================
|
||||
# CoinUtils
|
||||
@@ -290,15 +227,7 @@ endif()
|
||||
# - internal by default (CoinUtils),
|
||||
# - external if COINUTILS_INCLUDE_DIR_HINTS and a valid CoinUtils setup is found
|
||||
# ==============================================================================
|
||||
-if (NOT DEFINED COINUTILS_INCLUDE_DIR_HINTS)
|
||||
- set(COINUTILS_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/CoinUtils/src/)
|
||||
- set(OpenMVG_USE_INTERNAL_COINUTILS ON)
|
||||
-endif()
|
||||
-find_package(CoinUtils QUIET)
|
||||
-if (NOT COINUTILS_FOUND OR OpenMVG_USE_INTERNAL_COINUTILS)
|
||||
- set(COINUTILS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/CoinUtils/src/)
|
||||
- set(COINUTILS_LIBRARY lib_CoinUtils)
|
||||
-endif()
|
||||
+find_package(CoinUtils REQUIRED)
|
||||
|
||||
## ==============================================================================
|
||||
## Clp
|
||||
@@ -306,17 +235,7 @@ endif()
|
||||
## - internal by default (Clp),
|
||||
## - external if CLP_INCLUDE_DIR_HINTS and a valid Clp setup is found
|
||||
## ==============================================================================
|
||||
-if (NOT DEFINED CLP_INCLUDE_DIR_HINTS)
|
||||
- set(CLP_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Clp/src/)
|
||||
- set(OpenMVG_USE_INTERNAL_CLP ON)
|
||||
-endif()
|
||||
-find_package(Clp QUIET)
|
||||
-if (NOT CLP_FOUND OR OpenMVG_USE_INTERNAL_CLP)
|
||||
- set(CLP_INCLUDE_DIRS
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Clp/src/
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Clp/src/OsiClp/)
|
||||
- set(CLP_LIBRARIES lib_clp lib_OsiClpSolver)
|
||||
-endif()
|
||||
+find_package(Clp REQUIRED)
|
||||
|
||||
# ==============================================================================
|
||||
# Osi
|
||||
@@ -324,15 +243,7 @@ endif()
|
||||
# - internal by default (Osi),
|
||||
# - external if OSI_INCLUDE_DIR_HINTS and a valid Osi setup is found
|
||||
# ==============================================================================
|
||||
-if (NOT DEFINED OSI_INCLUDE_DIR_HINTS)
|
||||
- set(OSI_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Osi/src/)
|
||||
- set(OpenMVG_USE_INTERNAL_OSI ON)
|
||||
-endif()
|
||||
-find_package(Osi QUIET)
|
||||
-if (NOT OSI_FOUND OR OpenMVG_USE_INTERNAL_OSI)
|
||||
- set(OSI_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Osi/src/Osi/)
|
||||
- set(OSI_LIBRARY lib_Osi)
|
||||
-endif()
|
||||
+find_package(Osi REQUIRED)
|
||||
|
||||
# ==============================================================================
|
||||
# Internal CLP/OSI/COINUTILS libraries:
|
||||
@@ -351,17 +262,7 @@ endif()
|
||||
# - internal by default (Lemon),
|
||||
# - external if LEMON_INCLUDE_DIR_HINTS and a valid Lemon setup is found
|
||||
# ==============================================================================
|
||||
-if (NOT DEFINED LEMON_INCLUDE_DIR_HINTS)
|
||||
- set(LEMON_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lemon)
|
||||
- set(OpenMVG_USE_INTERNAL_LEMON ON)
|
||||
-endif()
|
||||
-find_package(Lemon QUIET)
|
||||
-if (NOT LEMON_FOUND OR OpenMVG_USE_INTERNAL_LEMON)
|
||||
- set(LEMON_INCLUDE_DIRS
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lemon
|
||||
- ${PROJECT_BINARY_DIR}/third_party/lemon)
|
||||
- set(LEMON_LIBRARY openMVG_lemon)
|
||||
-endif()
|
||||
+find_package(LEMON REQUIRED)
|
||||
|
||||
# ==============================================================================
|
||||
# OpenCV
|
||||
@@ -369,14 +270,13 @@ endif()
|
||||
# - only external and enabled only if OpenMVG_USE_OPENCV is set to ON
|
||||
# ==============================================================================
|
||||
if (OpenMVG_USE_OPENCV)
|
||||
- find_package( OpenCV QUIET )
|
||||
- if (NOT OpenCV_FOUND OR OpenCV_VERSION VERSION_LESS "3.0.0")
|
||||
- message(STATUS "OpenCV was not found (note that OpenCV version >= 3.0.0 is required). -> Disabling OpenCV support.")
|
||||
- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OPENCV OFF)
|
||||
- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OCVSIFT OFF)
|
||||
- endif()
|
||||
+ find_package( OpenCV REQUIRED )
|
||||
endif()
|
||||
|
||||
+# ==============================================================================
|
||||
+# Suitesparse
|
||||
+# ==============================================================================
|
||||
+find_package(suitesparse REQUIRED)
|
||||
|
||||
# ==============================================================================
|
||||
# Third-party libraries:
|
||||
@@ -469,67 +369,67 @@ message("** Use OpenCV SIFT features: " ${OpenMVG_USE_OCVSIFT})
|
||||
|
||||
message("\n")
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_CEREAL)
|
||||
+if (OpenMVG_USE_INTERNAL_CEREAL)
|
||||
message(STATUS "CEREAL: (internal)")
|
||||
else()
|
||||
message(STATUS "CEREAL: (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_EIGEN)
|
||||
+if (OpenMVG_USE_INTERNAL_EIGEN)
|
||||
message(STATUS "EIGEN: " ${EIGEN_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "EIGEN: " ${EIGEN_VERSION} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_CERES)
|
||||
+if (OpenMVG_USE_INTERNAL_CERES)
|
||||
message(STATUS "CERES: " ${CERES_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "CERES: " ${CERES_VERSION} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_FLANN)
|
||||
+if (OpenMVG_USE_INTERNAL_FLANN)
|
||||
message(STATUS "FLANN: " ${FLANN_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "FLANN: " ${FLANN_VERSION} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_TIFF)
|
||||
+if (OpenMVG_USE_INTERNAL_TIFF)
|
||||
message(STATUS "LIBTIFF: " ${TIFF_VERSION_STRING} " (internal)")
|
||||
else()
|
||||
message(STATUS "LIBTIFF: " ${TIFF_VERSION_STRING} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_PNG)
|
||||
+if (OpenMVG_USE_INTERNAL_PNG)
|
||||
message(STATUS "LIBPNG: " ${PNG_VERSION_STRING} " (internal)")
|
||||
else()
|
||||
message(STATUS "LIBPNG: " ${PNG_VERSION_STRING} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_JPEG)
|
||||
+if (OpenMVG_USE_INTERNAL_JPEG)
|
||||
message(STATUS "LIBJPEG (internal)")
|
||||
else()
|
||||
message(STATUS "LIBJPEG (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_CLP)
|
||||
+if (OpenMVG_USE_INTERNAL_CLP)
|
||||
message(STATUS "CLP: " ${CLP_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "CLP: " ${CLP_VERSION} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_COINUTILS)
|
||||
+if (OpenMVG_USE_INTERNAL_COINUTILS)
|
||||
message(STATUS "COINUTILS: " ${COINUTILS_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "COINUTILS: " ${COINUTILS_VERSION} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_OSI)
|
||||
+if (OpenMVG_USE_INTERNAL_OSI)
|
||||
message(STATUS "OSI: " ${OSI_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "OSI: " ${OSI_VERSION} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_LEMON)
|
||||
+if (OpenMVG_USE_INTERNAL_LEMON)
|
||||
message(STATUS "LEMON: " ${LEMON_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "LEMON: " ${LEMON_VERSION} " (external)")
|
||||
diff --git a/src/cmakeFindModules/FindClp.cmake b/src/cmakeFindModules/FindClp.cmake
|
||||
index c997b87..74c3aae 100644
|
||||
--- a/src/cmakeFindModules/FindClp.cmake
|
||||
+++ b/src/cmakeFindModules/FindClp.cmake
|
||||
@@ -51,8 +51,8 @@ IF(EXISTS "${CLP_DIR}" AND NOT "${CLP_DIR}" STREQUAL "")
|
||||
SET(CLP_INCLUDE_DIR ${CLP_DIR})
|
||||
|
||||
FIND_LIBRARY(CLP_LIBRARY NAMES Clp)
|
||||
- FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver)
|
||||
- FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp)
|
||||
+ FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver Clp)
|
||||
+ FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp Clp)
|
||||
|
||||
# locate Clp libraries
|
||||
IF(DEFINED CLP_LIBRARY AND DEFINED CLPSOLVER_LIBRARY AND DEFINED OSICLP_LIBRARY)
|
||||
diff --git a/src/openMVG/linearProgramming/CMakeLists.txt b/src/openMVG/linearProgramming/CMakeLists.txt
|
||||
index cc5212f..acc57dd 100644
|
||||
--- a/src/openMVG/linearProgramming/CMakeLists.txt
|
||||
+++ b/src/openMVG/linearProgramming/CMakeLists.txt
|
||||
@@ -15,16 +15,12 @@ target_link_libraries(openMVG_linearProgramming
|
||||
PUBLIC
|
||||
openMVG_numeric
|
||||
PRIVATE
|
||||
- ${CLP_LIBRARIES} # clp + solver wrapper
|
||||
- ${COINUTILS_LIBRARY} # container tools
|
||||
- ${OSI_LIBRARY} # generic LP
|
||||
+ Coin::Clp # clp + solver wrapper
|
||||
+ Coin::CoinUtils # container tools
|
||||
+ Coin::Osi # generic LP
|
||||
)
|
||||
|
||||
target_include_directories(openMVG_linearProgramming
|
||||
- PRIVATE
|
||||
- ${CLP_INCLUDE_DIRS}
|
||||
- ${COINUTILS_INCLUDE_DIRS}
|
||||
- ${OSI_INCLUDE_DIRS}
|
||||
PUBLIC
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
diff --git a/src/openMVG/matching/CMakeLists.txt b/src/openMVG/matching/CMakeLists.txt
|
||||
index 80b1fe6..a091b47 100644
|
||||
--- a/src/openMVG/matching/CMakeLists.txt
|
||||
+++ b/src/openMVG/matching/CMakeLists.txt
|
||||
@@ -18,6 +18,7 @@ list(REMOVE_ITEM matching_files_cpp ${REMOVEFILESUNITTEST})
|
||||
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
+find_package(flann REQUIRED)
|
||||
|
||||
set_source_files_properties(${matching_files_cpp} PROPERTIES LANGUAGE CXX)
|
||||
add_library(openMVG_matching
|
||||
@@ -38,10 +39,10 @@ target_link_libraries(openMVG_matching
|
||||
openMVG_features
|
||||
Threads::Threads
|
||||
)
|
||||
-if (NOT DEFINED OpenMVG_USE_INTERNAL_FLANN)
|
||||
+if (NOT OpenMVG_USE_INTERNAL_FLANN)
|
||||
target_link_libraries(openMVG_matching
|
||||
PUBLIC
|
||||
- ${FLANN_LIBRARIES}
|
||||
+ flann::flann
|
||||
)
|
||||
endif()
|
||||
set_target_properties(openMVG_matching PROPERTIES SOVERSION ${OPENMVG_VERSION_MAJOR} VERSION "${OPENMVG_VERSION_MAJOR}.${OPENMVG_VERSION_MINOR}")
|
||||
diff --git a/src/third_party/CMakeLists.txt b/src/third_party/CMakeLists.txt
|
||||
index 816a941..f0b7145 100644
|
||||
--- a/src/third_party/CMakeLists.txt
|
||||
+++ b/src/third_party/CMakeLists.txt
|
||||
@@ -18,7 +18,7 @@ add_subdirectory(stlplus3)
|
||||
set(STLPLUS_LIBRARY openMVG_stlplus PARENT_SCOPE)
|
||||
|
||||
# Add graph library
|
||||
-if(DEFINED OpenMVG_USE_INTERNAL_LEMON)
|
||||
+if(OpenMVG_USE_INTERNAL_LEMON)
|
||||
add_subdirectory(lemon)
|
||||
set_property(TARGET openMVG_lemon PROPERTY FOLDER OpenMVG/3rdParty/lemon)
|
||||
set_property(TARGET check PROPERTY FOLDER OpenMVG/3rdParty/lemon)
|
||||
@@ -68,7 +68,7 @@ endif (NOT TIFF_FOUND)
|
||||
add_subdirectory(vectorGraphics)
|
||||
|
||||
# Add ceres-solver (A Nonlinear Least Squares Minimizer)
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_CERES)
|
||||
+if (OpenMVG_USE_INTERNAL_CERES)
|
||||
add_subdirectory(cxsparse)
|
||||
add_subdirectory(ceres-solver)
|
||||
set_property(TARGET openMVG_cxsparse PROPERTY FOLDER OpenMVG/3rdParty/ceres)
|
||||
@@ -76,7 +76,7 @@ if (DEFINED OpenMVG_USE_INTERNAL_CERES)
|
||||
endif()
|
||||
|
||||
# Add an Approximate Nearest Neighbor library
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_FLANN)
|
||||
+if (OpenMVG_USE_INTERNAL_FLANN)
|
||||
set(FLANN_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/flann/src/cpp)
|
||||
add_subdirectory(flann)
|
||||
endif()
|
||||
@@ -90,7 +90,7 @@ add_subdirectory(fast)
|
||||
##
|
||||
# Install Header only libraries if necessary
|
||||
##
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_EIGEN)
|
||||
+if (OpenMVG_USE_INTERNAL_EIGEN)
|
||||
#Configure Eigen install
|
||||
set(EIGEN_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/eigen)
|
||||
add_subdirectory(eigen)
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 9cfd06c..a4dea06 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -14,6 +14,7 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(FATAL_ERROR "In-source builds not allowed.")
|
||||
endif()
|
||||
|
||||
+if(0)
|
||||
# ==============================================================================
|
||||
# OpenMVG build options
|
||||
# ==============================================================================
|
||||
@@ -31,7 +32,7 @@ option(OpenMVG_USE_OPENMP "Enable OpenMP parallelization" ON)
|
||||
# and openMVG simultaneously
|
||||
# ==============================================================================
|
||||
option(OpenMVG_USE_OPENCV "Build or not opencv+openMVG samples programs" OFF)
|
||||
-
|
||||
+endif()
|
||||
# ==============================================================================
|
||||
# Since OpenCV 3, SIFT is no longer in the default modules. See
|
||||
# https://github.com/itseez/opencv_contrib for more informations.
|
||||
@@ -85,6 +86,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
register_definitions(-DOPENMVG_STD_UNORDERED_MAP)
|
||||
endif()
|
||||
|
||||
+if(0)
|
||||
# ==============================================================================
|
||||
# Check that submodule have been initialized and updated
|
||||
# ==============================================================================
|
||||
@@ -93,6 +95,7 @@ if (NOT EXISTS ${PROJECT_SOURCE_DIR}/dependencies/cereal/include)
|
||||
"\n submodule(s) are missing, please update your repository:\n"
|
||||
" > git submodule update -i\n")
|
||||
endif()
|
||||
+endif()
|
||||
|
||||
# ==============================================================================
|
||||
# Additional cmake find modules
|
||||
@@ -128,7 +131,6 @@ if (OpenMVG_USE_OPENMP)
|
||||
find_package(OpenMP)
|
||||
if (OPENMP_FOUND)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
- option(OpenMVG_USE_OPENMP "Use OpenMP for parallelization" ON)
|
||||
register_definitions(-DOPENMVG_USE_OPENMP)
|
||||
if (NOT MSVC)
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
@@ -139,11 +141,6 @@ if (OpenMVG_USE_OPENMP)
|
||||
endif()
|
||||
endif (NOT MSVC)
|
||||
endif (OPENMP_FOUND)
|
||||
-else (OpenMVG_USE_OPENMP)
|
||||
- option(OpenMVG_USE_OPENMP "Use OpenMP for parallelization" OFF)
|
||||
- include(UpdateCacheVariable)
|
||||
- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OPENMP OFF)
|
||||
- remove_definitions(-DOPENMVG_USE_OPENMP)
|
||||
endif (OpenMVG_USE_OPENMP)
|
||||
|
||||
# ==============================================================================
|
||||
@@ -182,6 +179,7 @@ if (OpenMVG_BUILD_OPENGL_EXAMPLES)
|
||||
set_property(TARGET glfw PROPERTY FOLDER OpenMVG/3rdParty/glfw)
|
||||
endif (OpenMVG_BUILD_OPENGL_EXAMPLES)
|
||||
|
||||
+if(0)
|
||||
# Dependencies install rules
|
||||
install(
|
||||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/
|
||||
@@ -189,7 +187,7 @@ install(
|
||||
COMPONENT headers
|
||||
FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h"
|
||||
)
|
||||
-
|
||||
+endif()
|
||||
# ==============================================================================
|
||||
# --END-- SUBMODULE CONFIGURATION
|
||||
# ==============================================================================
|
||||
@@ -225,6 +223,7 @@ ENDMACRO(UNIT_TEST)
|
||||
# - external by default
|
||||
# - internal if cereal not found
|
||||
# ==============================================================================
|
||||
+if(0)
|
||||
find_package(cereal QUIET CONFIG)
|
||||
if (NOT TARGET cereal)
|
||||
add_library(cereal INTERFACE)
|
||||
@@ -237,6 +236,10 @@ if (NOT TARGET cereal)
|
||||
|
||||
set(OpenMVG_USE_INTERNAL_CEREAL ON)
|
||||
endif()
|
||||
+endif()
|
||||
+
|
||||
+find_package(cereal REQUIRED CONFIG)
|
||||
+get_target_property(CEREAL_INCLUDE_DIRS cereal INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
# ==============================================================================
|
||||
# Eigen
|
||||
@@ -245,6 +248,7 @@ endif()
|
||||
# - external if EIGEN_INCLUDE_DIR_HINTS is defined
|
||||
# - internal if Eigen not found
|
||||
# ==============================================================================
|
||||
+if(0)
|
||||
find_package(Eigen3 QUIET)
|
||||
if (NOT Eigen3_FOUND)
|
||||
set(EIGEN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/eigen)
|
||||
@@ -253,13 +257,17 @@ if (NOT Eigen3_FOUND)
|
||||
else()
|
||||
set(EIGEN_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
|
||||
endif()
|
||||
+endif()
|
||||
|
||||
+find_package(Eigen3 REQUIRED)
|
||||
+set(EIGEN_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
|
||||
# ==============================================================================
|
||||
# Ceres
|
||||
# ==============================================================================
|
||||
# - external by default if CERES_DIR_HINTS or find_package found a valid Ceres
|
||||
# - internal if ceres not found (ceres-solver+cxsparse+miniglog)
|
||||
# ==============================================================================
|
||||
+if(0)
|
||||
find_package(Ceres QUIET HINTS ${CERES_DIR_HINTS})
|
||||
if (NOT Ceres_FOUND)
|
||||
set(OpenMVG_USE_INTERNAL_CERES ON)
|
||||
@@ -271,13 +279,16 @@ if (NOT Ceres_FOUND)
|
||||
STRING(REGEX REPLACE "version ([0-9.]+).*" "\\1" CERES_VERSION ${CERES_CONFIG})
|
||||
set(CERES_LIBRARIES openMVG_ceres)
|
||||
endif()
|
||||
+endif()
|
||||
|
||||
+find_package(Ceres REQUIRED)
|
||||
# ==============================================================================
|
||||
# Flann
|
||||
# ==============================================================================
|
||||
# - internal by default (flann),
|
||||
# - external if FLANN_INCLUDE_DIR_HINTS and a valid Flann setup is found
|
||||
# ==============================================================================
|
||||
+if(0)
|
||||
if (NOT DEFINED FLANN_INCLUDE_DIR_HINTS)
|
||||
set(FLANN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp)
|
||||
set(OpenMVG_USE_INTERNAL_FLANN ON)
|
||||
@@ -286,13 +297,16 @@ find_package(Flann QUIET)
|
||||
if (NOT FLANN_FOUND OR OpenMVG_USE_INTERNAL_FLANN)
|
||||
set(FLANN_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp)
|
||||
endif()
|
||||
+endif()
|
||||
|
||||
+find_package(flann REQUIRED)
|
||||
# ==============================================================================
|
||||
# CoinUtils
|
||||
# ==============================================================================
|
||||
# - internal by default (CoinUtils),
|
||||
# - external if COINUTILS_INCLUDE_DIR_HINTS and a valid CoinUtils setup is found
|
||||
# ==============================================================================
|
||||
+if(0)
|
||||
if (NOT DEFINED COINUTILS_INCLUDE_DIR_HINTS)
|
||||
set(COINUTILS_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/CoinUtils/src/)
|
||||
set(OpenMVG_USE_INTERNAL_COINUTILS ON)
|
||||
@@ -302,13 +316,16 @@ if (NOT DEFINED COINUTILS_INCLUDE_DIR_HINTS)
|
||||
else()
|
||||
find_package(CoinUtils QUIET)
|
||||
endif()
|
||||
+endif()
|
||||
|
||||
+find_package(CoinUtils REQUIRED)
|
||||
## ==============================================================================
|
||||
## Clp
|
||||
## ==============================================================================
|
||||
## - internal by default (Clp),
|
||||
## - external if CLP_INCLUDE_DIR_HINTS and a valid Clp setup is found
|
||||
## ==============================================================================
|
||||
+if(0)
|
||||
if (NOT DEFINED CLP_INCLUDE_DIR_HINTS)
|
||||
set(CLP_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Clp/src/)
|
||||
set(OpenMVG_USE_INTERNAL_CLP ON)
|
||||
@@ -320,6 +337,9 @@ if (NOT DEFINED CLP_INCLUDE_DIR_HINTS)
|
||||
else()
|
||||
find_package(Clp QUIET)
|
||||
endif()
|
||||
+endif()
|
||||
+
|
||||
+find_package(Clp REQUIRED)
|
||||
|
||||
# ==============================================================================
|
||||
# Osi
|
||||
@@ -327,6 +347,7 @@ endif()
|
||||
# - internal by default (Osi),
|
||||
# - external if OSI_INCLUDE_DIR_HINTS and a valid Osi setup is found
|
||||
# ==============================================================================
|
||||
+if(0)
|
||||
if (NOT DEFINED OSI_INCLUDE_DIR_HINTS)
|
||||
set(OSI_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Osi/src/)
|
||||
set(OpenMVG_USE_INTERNAL_OSI ON)
|
||||
@@ -336,6 +357,9 @@ if (NOT DEFINED OSI_INCLUDE_DIR_HINTS)
|
||||
else()
|
||||
find_package(Osi QUIET)
|
||||
endif()
|
||||
+endif()
|
||||
+
|
||||
+find_package(Osi REQUIRED)
|
||||
|
||||
# ==============================================================================
|
||||
# Internal CLP/OSI/COINUTILS libraries:
|
||||
@@ -354,6 +378,7 @@ endif()
|
||||
# - internal by default (Lemon),
|
||||
# - external if LEMON_INCLUDE_DIR_HINTS and a valid Lemon setup is found
|
||||
# ==============================================================================
|
||||
+if(0)
|
||||
if (NOT DEFINED LEMON_INCLUDE_DIR_HINTS)
|
||||
set(LEMON_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lemon)
|
||||
set(OpenMVG_USE_INTERNAL_LEMON ON)
|
||||
@@ -365,6 +390,9 @@ if (NOT LEMON_FOUND OR OpenMVG_USE_INTERNAL_LEMON)
|
||||
${PROJECT_BINARY_DIR}/third_party/lemon)
|
||||
set(LEMON_LIBRARY openMVG_lemon)
|
||||
endif()
|
||||
+endif()
|
||||
+
|
||||
+find_package(LEMON REQUIRED)
|
||||
|
||||
# ==============================================================================
|
||||
# OpenCV
|
||||
@@ -372,15 +400,13 @@ endif()
|
||||
# - only external and enabled only if OpenMVG_USE_OPENCV is set to ON
|
||||
# ==============================================================================
|
||||
if (OpenMVG_USE_OPENCV)
|
||||
- find_package( OpenCV QUIET )
|
||||
- if (NOT OpenCV_FOUND OR OpenCV_VERSION VERSION_LESS "3.0.0")
|
||||
- message(STATUS "OpenCV was not found (note that OpenCV version >= 3.0.0 is required). -> Disabling OpenCV support.")
|
||||
- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OPENCV OFF)
|
||||
- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OCVSIFT OFF)
|
||||
- endif()
|
||||
+ find_package( OpenCV REQUIRED )
|
||||
endif()
|
||||
|
||||
-
|
||||
+# ==============================================================================
|
||||
+# Suitesparse
|
||||
+# ==============================================================================
|
||||
+find_package(suitesparse REQUIRED)
|
||||
# ==============================================================================
|
||||
# Third-party libraries:
|
||||
# ==============================================================================
|
||||
@@ -472,67 +498,67 @@ message("** Use OpenCV SIFT features: " ${OpenMVG_USE_OCVSIFT})
|
||||
|
||||
message("\n")
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_CEREAL)
|
||||
+if (OpenMVG_USE_INTERNAL_CEREAL)
|
||||
message(STATUS "CEREAL: (internal)")
|
||||
else()
|
||||
message(STATUS "CEREAL: (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_EIGEN)
|
||||
+if (OpenMVG_USE_INTERNAL_EIGEN)
|
||||
message(STATUS "EIGEN: " ${EIGEN_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "EIGEN: " ${EIGEN_VERSION} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_CERES)
|
||||
+if (OpenMVG_USE_INTERNAL_CERES)
|
||||
message(STATUS "CERES: " ${CERES_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "CERES: " ${CERES_VERSION} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_FLANN)
|
||||
+if (OpenMVG_USE_INTERNAL_FLANN)
|
||||
message(STATUS "FLANN: " ${FLANN_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "FLANN: " ${FLANN_VERSION} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_TIFF)
|
||||
+if (OpenMVG_USE_INTERNAL_TIFF)
|
||||
message(STATUS "LIBTIFF: " ${TIFF_VERSION_STRING} " (internal)")
|
||||
else()
|
||||
message(STATUS "LIBTIFF: " ${TIFF_VERSION_STRING} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_PNG)
|
||||
+if (OpenMVG_USE_INTERNAL_PNG)
|
||||
message(STATUS "LIBPNG: " ${PNG_VERSION_STRING} " (internal)")
|
||||
else()
|
||||
message(STATUS "LIBPNG: " ${PNG_VERSION_STRING} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_JPEG)
|
||||
+if (OpenMVG_USE_INTERNAL_JPEG)
|
||||
message(STATUS "LIBJPEG (internal)")
|
||||
else()
|
||||
message(STATUS "LIBJPEG (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_CLP)
|
||||
+if (OpenMVG_USE_INTERNAL_CLP)
|
||||
message(STATUS "CLP: " ${CLP_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "CLP: " ${CLP_VERSION} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_COINUTILS)
|
||||
+if (OpenMVG_USE_INTERNAL_COINUTILS)
|
||||
message(STATUS "COINUTILS: " ${COINUTILS_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "COINUTILS: " ${COINUTILS_VERSION} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_OSI)
|
||||
+if (OpenMVG_USE_INTERNAL_OSI)
|
||||
message(STATUS "OSI: " ${OSI_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "OSI: " ${OSI_VERSION} " (external)")
|
||||
endif()
|
||||
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_LEMON)
|
||||
+if (OpenMVG_USE_INTERNAL_LEMON)
|
||||
message(STATUS "LEMON: " ${LEMON_VERSION} " (internal)")
|
||||
else()
|
||||
message(STATUS "LEMON: " ${LEMON_VERSION} " (external)")
|
||||
diff --git a/src/cmakeFindModules/FindClp.cmake b/src/cmakeFindModules/FindClp.cmake
|
||||
index 8a69c23..6a81580 100644
|
||||
--- a/src/cmakeFindModules/FindClp.cmake
|
||||
+++ b/src/cmakeFindModules/FindClp.cmake
|
||||
@@ -51,9 +51,8 @@ IF(EXISTS "${CLP_DIR}" AND NOT "${CLP_DIR}" STREQUAL "")
|
||||
SET(CLP_INCLUDE_DIR ${CLP_DIR})
|
||||
|
||||
FIND_LIBRARY(CLP_LIBRARY NAMES Clp)
|
||||
- FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver)
|
||||
- FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp)
|
||||
-
|
||||
+ FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver Clp)
|
||||
+ FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp Clp)
|
||||
# locate Clp libraries
|
||||
IF(DEFINED CLP_LIBRARY AND DEFINED CLPSOLVER_LIBRARY AND DEFINED OSICLP_LIBRARY)
|
||||
SET(CLP_LIBRARIES ${CLP_LIBRARY} ${CLPSOLVER_LIBRARY} ${OSICLP_LIBRARY})
|
||||
diff --git a/src/openMVG/linearProgramming/CMakeLists.txt b/src/openMVG/linearProgramming/CMakeLists.txt
|
||||
index cc5212f..acc57dd 100644
|
||||
--- a/src/openMVG/linearProgramming/CMakeLists.txt
|
||||
+++ b/src/openMVG/linearProgramming/CMakeLists.txt
|
||||
@@ -15,16 +15,12 @@ target_link_libraries(openMVG_linearProgramming
|
||||
PUBLIC
|
||||
openMVG_numeric
|
||||
PRIVATE
|
||||
- ${CLP_LIBRARIES} # clp + solver wrapper
|
||||
- ${COINUTILS_LIBRARY} # container tools
|
||||
- ${OSI_LIBRARY} # generic LP
|
||||
+ Coin::Clp # clp + solver wrapper
|
||||
+ Coin::CoinUtils # container tools
|
||||
+ Coin::Osi # generic LP
|
||||
)
|
||||
|
||||
target_include_directories(openMVG_linearProgramming
|
||||
- PRIVATE
|
||||
- ${CLP_INCLUDE_DIRS}
|
||||
- ${COINUTILS_INCLUDE_DIRS}
|
||||
- ${OSI_INCLUDE_DIRS}
|
||||
PUBLIC
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
diff --git a/src/openMVG/matching/CMakeLists.txt b/src/openMVG/matching/CMakeLists.txt
|
||||
index 5fcd972..b21ea7b 100644
|
||||
--- a/src/openMVG/matching/CMakeLists.txt
|
||||
+++ b/src/openMVG/matching/CMakeLists.txt
|
||||
@@ -18,6 +18,7 @@ list(REMOVE_ITEM matching_files_cpp ${REMOVEFILESUNITTEST})
|
||||
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
+find_package(flann REQUIRED)
|
||||
|
||||
set_source_files_properties(${matching_files_cpp} PROPERTIES LANGUAGE CXX)
|
||||
add_library(openMVG_matching
|
||||
@@ -39,10 +40,10 @@ target_link_libraries(openMVG_matching
|
||||
Threads::Threads
|
||||
cereal
|
||||
)
|
||||
-if (NOT DEFINED OpenMVG_USE_INTERNAL_FLANN)
|
||||
+if (NOT OpenMVG_USE_INTERNAL_FLANN)
|
||||
target_link_libraries(openMVG_matching
|
||||
PUBLIC
|
||||
- ${FLANN_LIBRARIES}
|
||||
+ flann::flann
|
||||
)
|
||||
endif()
|
||||
set_target_properties(openMVG_matching PROPERTIES SOVERSION ${OPENMVG_VERSION_MAJOR} VERSION "${OPENMVG_VERSION_MAJOR}.${OPENMVG_VERSION_MINOR}")
|
||||
diff --git a/src/third_party/CMakeLists.txt b/src/third_party/CMakeLists.txt
|
||||
index 816a941..f0b7145 100644
|
||||
--- a/src/third_party/CMakeLists.txt
|
||||
+++ b/src/third_party/CMakeLists.txt
|
||||
@@ -18,7 +18,7 @@ add_subdirectory(stlplus3)
|
||||
set(STLPLUS_LIBRARY openMVG_stlplus PARENT_SCOPE)
|
||||
|
||||
# Add graph library
|
||||
-if(DEFINED OpenMVG_USE_INTERNAL_LEMON)
|
||||
+if(OpenMVG_USE_INTERNAL_LEMON)
|
||||
add_subdirectory(lemon)
|
||||
set_property(TARGET openMVG_lemon PROPERTY FOLDER OpenMVG/3rdParty/lemon)
|
||||
set_property(TARGET check PROPERTY FOLDER OpenMVG/3rdParty/lemon)
|
||||
@@ -68,7 +68,7 @@ endif (NOT TIFF_FOUND)
|
||||
add_subdirectory(vectorGraphics)
|
||||
|
||||
# Add ceres-solver (A Nonlinear Least Squares Minimizer)
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_CERES)
|
||||
+if (OpenMVG_USE_INTERNAL_CERES)
|
||||
add_subdirectory(cxsparse)
|
||||
add_subdirectory(ceres-solver)
|
||||
set_property(TARGET openMVG_cxsparse PROPERTY FOLDER OpenMVG/3rdParty/ceres)
|
||||
@@ -76,7 +76,7 @@ if (DEFINED OpenMVG_USE_INTERNAL_CERES)
|
||||
endif()
|
||||
|
||||
# Add an Approximate Nearest Neighbor library
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_FLANN)
|
||||
+if (OpenMVG_USE_INTERNAL_FLANN)
|
||||
set(FLANN_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/flann/src/cpp)
|
||||
add_subdirectory(flann)
|
||||
endif()
|
||||
@@ -90,7 +90,7 @@ add_subdirectory(fast)
|
||||
##
|
||||
# Install Header only libraries if necessary
|
||||
##
|
||||
-if (DEFINED OpenMVG_USE_INTERNAL_EIGEN)
|
||||
+if (OpenMVG_USE_INTERNAL_EIGEN)
|
||||
#Configure Eigen install
|
||||
set(EIGEN_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/eigen)
|
||||
add_subdirectory(eigen)
|
||||
|
@ -6,8 +6,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO openMVG/openMVG
|
||||
REF v1.4
|
||||
SHA512 949cf3680375c87b06db0f4713c846422c98d1979d49e9db65761f63f6f3212f0fcd8425f23c6112f04fbbb90b241638c2fd9329bb6b8b612c1d073aac55759a
|
||||
REF 606d1c9e82123dd50de282128151a50bf42262fc # v1.5
|
||||
SHA512 eddcf4c5f86541112840a6d89bbf360d30b085c2b3ff3e39b357030a465163b465e89d01474f8dbd65b66f8bccfc1f54a58963324f622482e2960f00214b2b75
|
||||
PATCHES
|
||||
fixcmake.patch
|
||||
fix-config-cmake.patch
|
||||
@ -15,20 +15,12 @@ vcpkg_from_github(
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
openmp OpenMVG_USE_OPENMP
|
||||
openmp ENABLE_OPENMP
|
||||
opencv OpenMVG_USE_OPENCV
|
||||
opencv OpenMVG_USE_OCVSIFT
|
||||
opencv ENABLE_OPENCV
|
||||
)
|
||||
|
||||
set(ENABLE_OPENCV OFF)
|
||||
if("opencv" IN_LIST FEATURES)
|
||||
set(ENABLE_OPENCV ON)
|
||||
endif()
|
||||
|
||||
set(ENABLE_OPENMP OFF)
|
||||
if("openmp" IN_LIST FEATURES)
|
||||
set(ENABLE_OPENMP ON)
|
||||
endif()
|
||||
|
||||
# remove some deps to prevent conflict
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/src/third_party/ceres-solver
|
||||
${SOURCE_PATH}/src/third_party/cxsparse
|
||||
@ -96,4 +88,4 @@ endif()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmvg RENAME copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
Loading…
x
Reference in New Issue
Block a user