File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,9 +93,13 @@ if(ALICEVISION_BUILD_SWIG_BINDING)
9393 SOURCES aliceVision.i
9494 )
9595
96+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" )
97+ list (APPEND SWIG_EXTRA_COMPILE_OPTIONS "-DSWIGWORDSIZE64" )
98+ endif ()
99+
96100 set_property (
97101 TARGET pyalicevision
98- PROPERTY SWIG_COMPILE_OPTIONS -doxygen
102+ PROPERTY SWIG_COMPILE_OPTIONS -doxygen ${SWIG_EXTRA_COMPILE_OPTIONS}
99103 )
100104
101105 target_include_directories (pyalicevision
@@ -117,10 +121,12 @@ if(ALICEVISION_BUILD_SWIG_BINDING)
117121 target_link_libraries (pyalicevision
118122 PUBLIC
119123 aliceVision_numeric
124+ ${Python3_LIBRARIES}
120125 )
121126 install (
122127 TARGETS
123128 pyalicevision
129+
124130 DESTINATION
125131 ${CMAKE_INSTALL_PREFIX}
126132 )
Original file line number Diff line number Diff line change @@ -71,9 +71,13 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
7171 SOURCES Camera.i
7272 )
7373
74+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" )
75+ list (APPEND SWIG_EXTRA_COMPILE_OPTIONS "-DSWIGWORDSIZE64" )
76+ endif ()
77+
7478 set_property (
7579 TARGET camera
76- PROPERTY SWIG_COMPILE_OPTIONS -doxygen
80+ PROPERTY SWIG_COMPILE_OPTIONS -doxygen ${SWIG_EXTRA_COMPILE_OPTIONS}
7781 )
7882
7983 target_include_directories (camera
@@ -95,6 +99,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
9599 target_link_libraries (camera
96100 PUBLIC
97101 aliceVision_camera
102+ ${Python3_LIBRARIES}
98103 )
99104
100105 install (
Original file line number Diff line number Diff line change @@ -48,9 +48,13 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
4848 SOURCES Geometry.i
4949 )
5050
51+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" )
52+ list (APPEND SWIG_EXTRA_COMPILE_OPTIONS "-DSWIGWORDSIZE64" )
53+ endif ()
54+
5155 set_property (
5256 TARGET geometry
53- PROPERTY SWIG_COMPILE_OPTIONS -doxygen
57+ PROPERTY SWIG_COMPILE_OPTIONS -doxygen ${SWIG_EXTRA_COMPILE_OPTIONS}
5458 )
5559
5660 target_include_directories (geometry
@@ -72,6 +76,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
7276 target_link_libraries (geometry
7377 PUBLIC
7478 aliceVision_geometry
79+ ${Python3_LIBRARIES}
7580 )
7681
7782 install (
Original file line number Diff line number Diff line change 2323%}
2424
2525%inline %{
26- typedef long unsigned int size_t ;
26+ #ifdef SWIGWORDSIZE64
27+ typedef long unsigned int size_t ;
28+ #else
29+ typedef unsigned long long size_t ;
30+ #endif
2731 typedef uint32_t IndexT;
2832%}
2933
30-
3134%template (IntVector) std::vector<int >;
3235%template (DoubleVector) std::vector<double >;
3336%template (StringVector) std::vector<std::string>;
3740
3841%template (IndexTSet) std::set<IndexT>;
3942
40- %template (SizeTPair) std::pair<size_t , size_t >;
43+ #ifdef SWIGWORDSIZE64
44+ namespace std {
45+ %template (SizeTPair) pair<size_t , size_t >;
46+ }
47+ #else
48+ %template (SizeTPair) std::pair<size_t , size_t >;
49+ #endif
4150
4251// As defined in aliceVision/types.hpp
4352%template (Pair) std::pair<IndexT, IndexT>;
Original file line number Diff line number Diff line change @@ -61,9 +61,13 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
6161 SOURCES Hdr.i
6262 )
6363
64+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" )
65+ list (APPEND SWIG_EXTRA_COMPILE_OPTIONS "-DSWIGWORDSIZE64" )
66+ endif ()
67+
6468 set_property (
6569 TARGET hdr
66- PROPERTY SWIG_COMPILE_OPTIONS -doxygen
70+ PROPERTY SWIG_COMPILE_OPTIONS -doxygen ${SWIG_EXTRA_COMPILE_OPTIONS}
6771 )
6872
6973 target_include_directories (hdr
@@ -89,6 +93,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
8993 aliceVision_numeric
9094 aliceVision_image
9195 aliceVision_sfmData
96+ ${Python3_LIBRARIES}
9297 )
9398
9499 install (
Original file line number Diff line number Diff line change @@ -47,9 +47,13 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
4747 SOURCES numeric.i
4848 )
4949
50+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" )
51+ list (APPEND SWIG_EXTRA_COMPILE_OPTIONS "-DSWIGWORDSIZE64" )
52+ endif ()
53+
5054 set_property (
5155 TARGET numeric
52- PROPERTY SWIG_COMPILE_OPTIONS -doxygen
56+ PROPERTY SWIG_COMPILE_OPTIONS -doxygen ${SWIG_EXTRA_COMPILE_OPTIONS}
5357 )
5458
5559 target_include_directories (numeric
@@ -71,6 +75,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
7175 target_link_libraries (numeric
7276 PUBLIC
7377 aliceVision_numeric
78+ ${Python3_LIBRARIES}
7479 )
7580
7681 install (
Original file line number Diff line number Diff line change @@ -39,9 +39,13 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
3939 SOURCES SensorDB.i
4040 )
4141
42+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" )
43+ list (APPEND SWIG_EXTRA_COMPILE_OPTIONS "-DSWIGWORDSIZE64" )
44+ endif ()
45+
4246 set_property (
4347 TARGET sensorDB
44- PROPERTY SWIG_COMPILE_OPTIONS -doxygen
48+ PROPERTY SWIG_COMPILE_OPTIONS -doxygen ${SWIG_EXTRA_COMPILE_OPTIONS}
4549 )
4650
4751 target_include_directories (sensorDB
@@ -63,6 +67,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
6367 target_link_libraries (sensorDB
6468 PUBLIC
6569 aliceVision_sensorDB
70+ ${Python3_LIBRARIES}
6671 )
6772
6873 install (
Original file line number Diff line number Diff line change @@ -65,9 +65,13 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
6565 SOURCES SfMData.i
6666 )
6767
68+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" )
69+ list (APPEND SWIG_EXTRA_COMPILE_OPTIONS "-DSWIGWORDSIZE64" )
70+ endif ()
71+
6872 set_property (
6973 TARGET sfmData
70- PROPERTY SWIG_COMPILE_OPTIONS -doxygen
74+ PROPERTY SWIG_COMPILE_OPTIONS -doxygen ${SWIG_EXTRA_COMPILE_OPTIONS}
7175 )
7276
7377 target_include_directories (sfmData
@@ -90,6 +94,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
9094 PUBLIC
9195 aliceVision_sfmData
9296 aliceVision_camera
97+ ${Python3_LIBRARIES}
9398 )
9499
95100 install (
Original file line number Diff line number Diff line change @@ -108,9 +108,13 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
108108 SOURCES SfMDataIO.i
109109 )
110110
111+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" )
112+ list (APPEND SWIG_EXTRA_COMPILE_OPTIONS "-DSWIGWORDSIZE64" )
113+ endif ()
114+
111115 set_property (
112116 TARGET sfmDataIO
113- PROPERTY SWIG_COMPILE_OPTIONS -doxygen
117+ PROPERTY SWIG_COMPILE_OPTIONS -doxygen ${SWIG_EXTRA_COMPILE_OPTIONS}
114118 )
115119
116120 target_include_directories (sfmDataIO
@@ -132,6 +136,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
132136 target_link_libraries (sfmDataIO
133137 PUBLIC
134138 aliceVision_sfmDataIO
139+ ${Python3_LIBRARIES}
135140 )
136141
137142 install (
Original file line number Diff line number Diff line change @@ -29,9 +29,13 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
2929 SOURCES Stl.i
3030 )
3131
32+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" )
33+ list (APPEND SWIG_EXTRA_COMPILE_OPTIONS "-DSWIGWORDSIZE64" )
34+ endif ()
35+
3236 set_property (
3337 TARGET stl
34- PROPERTY SWIG_COMPILE_OPTIONS -doxygen
38+ PROPERTY SWIG_COMPILE_OPTIONS -doxygen ${SWIG_EXTRA_COMPILE_OPTIONS}
3539 )
3640
3741 target_include_directories (stl
@@ -55,6 +59,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
5559 aliceVision_stl
5660 aliceVision_system
5761 Boost::container
62+ ${Python3_LIBRARIES}
5863 )
5964
6065 install (
You can’t perform that action at this time.
0 commit comments