forked from openMVG/openMVG
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD
115 lines (91 loc) · 3.41 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
=====================================
OpenMVG (open Multiple View Geometry)
=====================================
-----------------
Build instruction
-----------------
Required tools:
* Cmake
* Git
* c/c++ compiler (gcc or visual studio or clang)
Getting the sources:
$ git clone --recursive https://github.com/openMVG/openMVG.git
or
$ git clone https://github.com/openMVG/openMVG.git
$ cd openMVG
$ git submodule init
$ git submodule update
------------------------------------
Using as library dependency in cmake
------------------------------------
Adding following lines to your CMakeLists.txt should provide OpenMVG usable as
static library:
add_subdirectory(openMVG/src)
include_directories(${OpenMVG_INCLUDES})
target_link_libraries(target ${OpenMVG_LIBS})
Information about required dependencies, standalone build and platform
specificity can be found below.
--------------------------
General informations
for openMVG cmake options
--------------------------
OpenMVG_BUILD_TESTS (ON/OFF(default))=> Build openMVG unit tests
OpenMVG_BUILD_EXAMPLES (ON/OFF(default))=> Build OpenMVG example applications.
Does not affect binaries under 'software'
-----------------
Linux compilation
-----------------
Setup the required external library.
* sudo apt-get install libpng-dev libjpeg-dev libxxf86vm1 libxxf86vm-dev libxi-dev libxrandr-dev
$ git clone --recursive https://github.com/openMVG/openMVG.git
$ cd openMVG
$ ls
AUTHORS BUILD docs logo README src ...
$ cd ..
$ mkdir openMVG_Build
$ cd openMVG_Build
$ cmake -DCMAKE_BUILD_TYPE=RELEASE . ../openMVG/src/
If you want enable unit tests and examples to the build:
$ cmake -DCMAKE_BUILD_TYPE=RELEASE -DOpenMVG_BUILD_TESTS=ON -DOpenMVG_BUILD_EXAMPLES=ON . ../openMVG/src/
=> In order to use the MOSEK 6 backend for the linear programming openMVG module
- Check that you have an uptodate MOSEK licence, else openMVG MOSEK unit test will fail.
$ cmake -DCMAKE_BUILD_TYPE=RELEASE
-DMOSEK_SEARCH_HEADER="~/Documents/Lib/mosek/6/tools/platform/linux64x86/h"
-DMOSEK_SEARCH_LIB="~/Documents/Lib/mosek/6/tools/platform/linux64x86/bin"
. ../openMVG/src/
If you want have an IDE openable project with codeblocks:
$ cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=RELEASE . ../openMVG/src/
Compile the project
$ make
For a multi-core compilation (Replace NBcore with the number of threads)
$ make -j NBcore
Launch test (if asked at cmake step)
$ make test
Have fun with the samples
$ cd openMVG_Samples
-------------------
Windows compilation
-------------------
Checkout the project
$ git clone --recursive https://github.com/openMVG/openMVG.git
Open cmake-gui
Fill the source path with the src openMVG path.
Fill the build path with a new directory
Select your Visual Studio IDE and click configure and then generate
Open the .sln solution created in your build directory.
Change the target to Release.
Compile the libraries and binaries samples.
-------------------
Mac compilation
-------------------
$ git clone --recursive https://github.com/openMVG/openMVG.git
$ cd openMVG
$ ls
AUTHORS BUILD docs logo README src ...
$ cd ..
$ mkdir openMVG_Build
$ cd openMVG_Build
$ cmake -DCMAKE_BUILD_TYPE=RELEASE -G "Xcode" . ../openMVG/src/
If you want enable unit tests and examples to the build:
$ cmake -DCMAKE_BUILD_TYPE=RELEASE -DOpenMVG_BUILD_TESTS=ON -DOpenMVG_BUILD_EXAMPLES=ON -G "Xcode" . ../openMVG/src/
$ xcodebuild -configuration Release