pineapple-src/externals/vcpkg/ports/theia/fix-external-dependencies2.patch

77 lines
3.4 KiB
Diff
Raw Normal View History

2022-07-23 03:01:36 +02:00
diff --git a/cmake/TheiaConfig.cmake.in b/cmake/TheiaConfig.cmake.in
index 7e9d912..2a98124 100644
--- a/cmake/TheiaConfig.cmake.in
+++ b/cmake/TheiaConfig.cmake.in
@@ -43,7 +43,7 @@ macro(THEIA_REPORT_NOT_FOUND REASON_MSG)
# use the camelcase library name, not uppercase.
if (Theia_FIND_QUIETLY)
message(STATUS "Failed to find Theia - " ${REASON_MSG} ${ARGN})
- else (Theia_FIND_REQUIRED)
+ elseif (Theia_FIND_REQUIRED)
message(FATAL_ERROR "Failed to find Theia - " ${REASON_MSG} ${ARGN})
else()
# Neither QUIETLY nor REQUIRED, use SEND_ERROR which emits an error
@@ -103,35 +103,35 @@ set(THEIA_INCLUDE_DIRS ${THEIA_INCLUDE_DIR})
# Eigen.
# Flag set during configuration and build of Theia.
-set(THEIA_EIGEN_VERSION @EIGEN_VERSION@)
+set(THEIA_EIGEN_VERSION @EIGEN3_VERSION@)
# Append the locations of Eigen when Theia was built to the search path hints.
-list(APPEND EIGEN_INCLUDE_DIR_HINTS @EIGEN_INCLUDE_DIR@)
+list(APPEND EIGEN_INCLUDE_DIR_HINTS @EIGEN3_INCLUDE_DIR@)
# Search quietly s/t we control the timing of the error message if not found.
-find_package(Eigen ${THEIA_EIGEN_VERSION} EXACT QUIET)
-if (EIGEN_FOUND)
+find_package(Eigen3 ${THEIA_EIGEN_VERSION} REQUIRED)
+if (EIGEN3_FOUND)
message(STATUS "Found required Theia dependency: "
- "Eigen version ${THEIA_EIGEN_VERSION} in ${EIGEN_INCLUDE_DIRS}")
-else (EIGEN_FOUND)
+ "Eigen version ${THEIA_EIGEN_VERSION} in ${EIGEN3_INCLUDE_DIRS}")
+else (EIGEN3_FOUND)
theia_report_not_found("Missing required Theia "
"dependency: Eigen version ${THEIA_EIGEN_VERSION}, please set "
"EIGEN_INCLUDE_DIR.")
-endif (EIGEN_FOUND)
-list(APPEND THEIA_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS})
+endif (EIGEN3_FOUND)
+list(APPEND THEIA_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIRS})
# Ceres.
# Append the locations of ceres when Theia was built to the search path hints.
-list(APPEND CERES_INCLUDE_DIR_HINTS @CERES_INCLUDE_DIR@)
-get_filename_component(THEIA_BUILD_CERES_LIBRARY_DIR @CERES_LIBRARIES@ PATH)
-list(APPEND CERES_LIBRARY_DIR_HINTS ${THEIA_BUILD_CERES_LIBRARY_DIR})
+#list(APPEND CERES_INCLUDE_DIR_HINTS @CERES_INCLUDE_DIR@)
+#get_filename_component(THEIA_BUILD_CERES_LIBRARY_DIR @CERES_LIBRARIES@ PATH)
+#list(APPEND CERES_LIBRARY_DIR_HINTS ${THEIA_BUILD_CERES_LIBRARY_DIR})
# Search quietly s/t we control the timing of the error message if not found.
find_package(Ceres REQUIRED)
list(APPEND THEIA_INCLUDE_DIRS ${CERES_INCLUDE_DIRS})
# Glog.
# Append the locations of glog when Theia was built to the search path hints.
-list(APPEND GLOG_INCLUDE_DIR_HINTS @GLOG_INCLUDE_DIR@)
-get_filename_component(THEIA_BUILD_GLOG_LIBRARY_DIR @GLOG_LIBRARY@ PATH)
-list(APPEND GLOG_LIBRARY_DIR_HINTS ${THEIA_BUILD_GLOG_LIBRARY_DIR})
+#list(APPEND GLOG_INCLUDE_DIR_HINTS @GLOG_INCLUDE_DIR@)
+#get_filename_component(THEIA_BUILD_GLOG_LIBRARY_DIR @GLOG_LIBRARY@ PATH)
+#list(APPEND GLOG_LIBRARY_DIR_HINTS ${THEIA_BUILD_GLOG_LIBRARY_DIR})
# Search quietly s/t we control the timing of the error message if not found.
find_package(Glog REQUIRED)
list(APPEND THEIA_INCLUDE_DIRS ${GLOG_INCLUDE_DIRS})
diff --git a/src/theia/CMakeLists.txt b/src/theia/CMakeLists.txt
index 768586d..c1f6593 100644
--- a/src/theia/CMakeLists.txt
+++ b/src/theia/CMakeLists.txt
@@ -207,7 +207,7 @@ set(THEIA_LIBRARY_DEPENDENCIES
${GFLAGS_LIBRARIES}
${GLOG_LIBRARIES}
${SUITESPARSE_LIBRARIES}
- ${OPENIMAGEIO_LIBRARIES}
+ OpenImageIO::OpenImageIO
akaze
statx
stlplus3