Statistics
| Branch: | Tag: | Revision:

root / host / docs / build.rst @ 77c578fc

History | View | Annotate | Download (4.23 KB)

1
========================================================================
2
UHD - Build Guide
3
========================================================================
4

    
5
.. contents:: Table of Contents
6

    
7
------------------------------------------------------------------------
8
Build Dependencies
9
------------------------------------------------------------------------
10

    
11
**Unix Notes:**
12
The dependencies can be acquired through the package manager.
13

    
14
**Windows Notes:**
15
The dependencies can be acquired through installable exe files.
16
Usually, the windows installer can be found on the project's website.
17
Some projects do not host windows installers, and if this is the case,
18
follow the auxiliary download url for the windows installer (below).
19

    
20
^^^^^^^^^^^^^^^^
21
Git
22
^^^^^^^^^^^^^^^^
23
Required to check out the repository.
24
On windows, install cygwin with git support to checkout the repository,
25
or install msysgit from http://code.google.com/p/msysgit/downloads/list
26

    
27
^^^^^^^^^^^^^^^^
28
C++
29
^^^^^^^^^^^^^^^^
30
On unix, this is GCC 4.0 and above. On windows, this is MSVC 2008.
31
Other compilers have not been tested yet or confirmed working.
32

    
33
^^^^^^^^^^^^^^^^
34
CMake
35
^^^^^^^^^^^^^^^^
36
* **Version:** at least 2.8
37
* **Required for:** build time
38
* **Download URL:** http://www.cmake.org/cmake/resources/software.html
39

    
40
^^^^^^^^^^^^^^^^
41
Boost
42
^^^^^^^^^^^^^^^^
43
* **Version:** at least 3.6 unix, at least 4.0 windows
44
* **Required for:** build time + run time
45
* **Download URL:** http://www.boost.org/users/download/
46
* **Download URL (windows installer):** http://www.boostpro.com/download
47

    
48
^^^^^^^^^^^^^^^^
49
Python
50
^^^^^^^^^^^^^^^^
51
* **Version:** at least 2.6
52
* **Required for:** build time
53
* **Download URL:** http://www.python.org/download/
54

    
55
^^^^^^^^^^^^^^^^
56
Cheetah
57
^^^^^^^^^^^^^^^^
58
* **Version:** at least 2.0
59
* **Required for:** build time
60
* **Download URL:** http://www.cheetahtemplate.org/download.html
61
* **Download URL (windows installer):** http://feisley.com/python/cheetah/
62

    
63
^^^^^^^^^^^^^^^^
64
Doxygen
65
^^^^^^^^^^^^^^^^
66
* **Required for:** build time (optional)
67
* **Download URL:** http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc
68

    
69
------------------------------------------------------------------------
70
Build Instructions (Unix)
71
------------------------------------------------------------------------
72

    
73
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74
Generate Makefiles with cmake
75
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76
::
77

    
78
    cd <uhd-repo-path>/host
79
    mkdir build
80
    cd build
81
    cmake ../
82

    
83
For a custom prefix, use: cmake -DCMAKE_INSTALL_PREFIX=<myprefix> ../
84

    
85
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86
Build and install
87
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88
::
89

    
90
    make
91
    make test
92
    sudo make install
93

    
94
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95
Setup the library path
96
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97
Make sure that libuhd.so is in your LD_LIBRARY_PATH
98
or add it to /etc/ld.so.conf and make sure to run sudo ldconfig
99

    
100

    
101
------------------------------------------------------------------------
102
Build Instructions (Windows)
103
------------------------------------------------------------------------
104

    
105
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106
Generate the project with cmake
107
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108
* Open the cmake gui program.
109
* Set the path to the source code: <uhd-repo-path>/host
110
* Set the path to the build directory: <uhd-repo-path>/host/build
111
* Make sure that the paths do not contain spaces.
112
* Click configure and select the MSVC compiler.
113
* Set the build variables and click configure again.
114
* Click generate and a project file will be created in the build directory.
115

    
116
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117
Build the project in MSVC
118
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119
* Open the generated project file in MSVC.
120
* Select the build all target, right click, and choose build.
121
* Select the install target, right click, and choose build.
122

    
123
**Note:** you may not have permission to build the install target.
124
You need to be an administrator or to run MSVC as administrator.
125

    
126
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127
Setup the PATH environment variable
128
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
129
* Add the boost library path to %PATH% (usually c:\\program files\\boost\\<version>\\lib)
130
* Add the uhd library path to %PATH% (usually c:\\program files\\uhd\\lib)