1 From 36820fbab1abeeebd99f14e368093e0e3f934ca7 Mon Sep 17 00:00:00 2001
2 From: Someone Serge <sergei.kozlukov@aalto.fi>
3 Date: Sat, 19 Feb 2022 02:37:54 +0200
4 Subject: [PATCH 3/4] cmake: use system pybind11
7 opensfm/src/CMakeLists.txt | 3 ++-
8 opensfm/src/bundle/CMakeLists.txt | 2 +-
9 opensfm/src/dense/CMakeLists.txt | 2 +-
10 opensfm/src/features/CMakeLists.txt | 1 -
11 opensfm/src/foundation/CMakeLists.txt | 1 -
12 opensfm/src/geo/CMakeLists.txt | 1 -
13 opensfm/src/geometry/CMakeLists.txt | 1 -
14 opensfm/src/map/CMakeLists.txt | 3 +--
15 opensfm/src/robust/CMakeLists.txt | 1 -
16 opensfm/src/sfm/CMakeLists.txt | 1 -
17 10 files changed, 5 insertions(+), 11 deletions(-)
19 diff --git a/opensfm/src/CMakeLists.txt b/opensfm/src/CMakeLists.txt
20 index 640d47a6..6e391ffa 100644
21 --- a/opensfm/src/CMakeLists.txt
22 +++ b/opensfm/src/CMakeLists.txt
23 @@ -54,6 +54,8 @@ endif()
25 find_package(gflags REQUIRED)
27 +find_package(pybind11 REQUIRED)
30 find_package(SuiteSparse)
31 find_package(Eigen3 REQUIRED)
32 @@ -82,7 +84,6 @@ else()
35 ####### Third party libraries #######
36 -add_subdirectory(third_party/pybind11)
37 add_subdirectory(third_party/akaze)
38 add_subdirectory(third_party/vlfeat)
40 diff --git a/opensfm/src/bundle/CMakeLists.txt b/opensfm/src/bundle/CMakeLists.txt
41 index 7cd9cf74..307e963a 100644
42 --- a/opensfm/src/bundle/CMakeLists.txt
43 +++ b/opensfm/src/bundle/CMakeLists.txt
44 @@ -52,7 +52,7 @@ target_link_libraries(pybundle PRIVATE
50 set_target_properties(pybundle PROPERTIES
51 LIBRARY_OUTPUT_DIRECTORY "${opensfm_SOURCE_DIR}/.."
53 diff --git a/opensfm/src/dense/CMakeLists.txt b/opensfm/src/dense/CMakeLists.txt
54 index cbebb5ea..2728749d 100644
55 --- a/opensfm/src/dense/CMakeLists.txt
56 +++ b/opensfm/src/dense/CMakeLists.txt
57 @@ -23,7 +23,7 @@ endif()
59 pybind11_add_module(pydense python/pybind.cc)
60 target_include_directories(pydense PRIVATE ${GLOG_INCLUDE_DIR})
61 -target_link_libraries(pydense PRIVATE dense foundation pybind11)
62 +target_link_libraries(pydense PRIVATE dense foundation)
63 set_target_properties(pydense PROPERTIES
64 LIBRARY_OUTPUT_DIRECTORY "${opensfm_SOURCE_DIR}/.."
66 diff --git a/opensfm/src/features/CMakeLists.txt b/opensfm/src/features/CMakeLists.txt
67 index b131d30a..6db5b3f1 100644
68 --- a/opensfm/src/features/CMakeLists.txt
69 +++ b/opensfm/src/features/CMakeLists.txt
70 @@ -22,7 +22,6 @@ target_link_libraries(pyfeatures
77 set_target_properties(pyfeatures PROPERTIES
78 diff --git a/opensfm/src/foundation/CMakeLists.txt b/opensfm/src/foundation/CMakeLists.txt
79 index 40185227..9e0e45e7 100644
80 --- a/opensfm/src/foundation/CMakeLists.txt
81 +++ b/opensfm/src/foundation/CMakeLists.txt
82 @@ -12,7 +12,6 @@ set(FOUNDATION_FILES
83 add_library(foundation ${FOUNDATION_FILES})
84 target_link_libraries(foundation
88 ${OpenMP_libomp_LIBRARY}
90 diff --git a/opensfm/src/geo/CMakeLists.txt b/opensfm/src/geo/CMakeLists.txt
91 index a9cbae02..75620d06 100644
92 --- a/opensfm/src/geo/CMakeLists.txt
93 +++ b/opensfm/src/geo/CMakeLists.txt
94 @@ -29,7 +29,6 @@ target_link_libraries(pygeo
100 set_target_properties(pygeo PROPERTIES
101 LIBRARY_OUTPUT_DIRECTORY "${opensfm_SOURCE_DIR}/.."
102 diff --git a/opensfm/src/geometry/CMakeLists.txt b/opensfm/src/geometry/CMakeLists.txt
103 index e6dda2c2..51bfd6c5 100644
104 --- a/opensfm/src/geometry/CMakeLists.txt
105 +++ b/opensfm/src/geometry/CMakeLists.txt
106 @@ -48,7 +48,6 @@ target_link_libraries(pygeometry
112 set_target_properties(pygeometry PROPERTIES
113 LIBRARY_OUTPUT_DIRECTORY "${opensfm_SOURCE_DIR}/.."
114 diff --git a/opensfm/src/map/CMakeLists.txt b/opensfm/src/map/CMakeLists.txt
115 index b6f67bcd..f869aa4c 100644
116 --- a/opensfm/src/map/CMakeLists.txt
117 +++ b/opensfm/src/map/CMakeLists.txt
118 @@ -20,7 +20,7 @@ set(MAP_FILES
119 add_library(map ${MAP_FILES})
120 target_link_libraries(map
127 @@ -39,7 +39,6 @@ target_link_libraries(pymap
134 if (OPENSFM_BUILD_TESTS)
135 diff --git a/opensfm/src/robust/CMakeLists.txt b/opensfm/src/robust/CMakeLists.txt
136 index ce70749f..40bdf7a4 100644
137 --- a/opensfm/src/robust/CMakeLists.txt
138 +++ b/opensfm/src/robust/CMakeLists.txt
139 @@ -29,7 +29,6 @@ target_link_libraries(pyrobust
145 set_target_properties(pyrobust PROPERTIES
146 LIBRARY_OUTPUT_DIRECTORY "${opensfm_SOURCE_DIR}/.."
147 diff --git a/opensfm/src/sfm/CMakeLists.txt b/opensfm/src/sfm/CMakeLists.txt
148 index 98c28f41..7f56b791 100644
149 --- a/opensfm/src/sfm/CMakeLists.txt
150 +++ b/opensfm/src/sfm/CMakeLists.txt
151 @@ -35,7 +35,6 @@ target_include_directories(pysfm PRIVATE ${GLOG_INCLUDE_DIR})
152 target_link_libraries(pysfm
158 set_target_properties(pysfm PROPERTIES