2
|
1 Palantir - A Lightweight, RESTful DICOM Server
|
|
2 ==============================================
|
|
3
|
|
4
|
|
5 Dependencies
|
|
6 ------------
|
|
7
|
|
8 Palantir uses CMake (http://www.cmake.org/) to automate its building
|
|
9 process. You thus have to download and install CMake first.
|
|
10
|
|
11 For the native build under Windows, you will also need to download and
|
|
12 install 7-Zip (http://www.7-zip.org/).
|
|
13
|
|
14 The other third party dependencies are automatically downloaded by the
|
|
15 CMake scripts. The downloaded packages are stored in the
|
|
16 "ThirdPartyDownloads" directory.
|
|
17
|
|
18
|
|
19 Building Palantir at a glance
|
|
20 -----------------------------
|
|
21
|
|
22 To build Palantir, you must:
|
|
23
|
|
24 1) Download the source code (either using Mercurial, or through the
|
|
25 released versions). For the examples below, we assume the source
|
|
26 directory is "~/Palantir".
|
|
27
|
|
28 2) Create a build directory. For the examples below, we assume the
|
|
29 build directory is "~/PalantirBuild".
|
|
30
|
|
31
|
|
32
|
|
33 Native Linux Compilation
|
|
34 ------------------------
|
|
35
|
|
36 To build binaries with debug information:
|
|
37
|
|
38 # cd ~/PalantirBuild
|
|
39 # cmake -DCMAKE_BUILD_TYPE=DEBUG ~/Palantir
|
|
40 # make
|
|
41 # make doc
|
|
42
|
|
43
|
|
44 To build a release version:
|
|
45
|
|
46 # cd ~/PalantirBuild
|
|
47 # cmake -DCMAKE_BUILD_TYPE=RELEASE ~/Palantir
|
|
48 # make
|
|
49 # make doc
|
|
50
|
|
51
|
|
52 Under Linux, you have the possibility to dynamically link Palantir
|
|
53 against the shared libraries of your system, provided their version is
|
|
54 recent enough. This greatly speeds up the compilation:
|
|
55
|
|
56 # cd ~/PalantirBuild
|
|
57 # cmake -DSTATIC_BUILD=OFF -DCMAKE_BUILD_TYPE=DEBUG ~/Palantir
|
|
58 # make
|
|
59
|
|
60
|
|
61
|
|
62 Cross-Compilation for Windows under Linux
|
|
63 -----------------------------------------
|
|
64
|
|
65 To cross-compile Windows binaries under Linux using MinGW, please use
|
|
66 the following command:
|
|
67
|
|
68 # cd ~/PalantirBuild
|
|
69 # cmake -DCMAKE_TOOLCHAIN_FILE=~/Palantir/Resources/MinGWToolchain.cmake -DCMAKE_BUILD_TYPE=DEBUG ~/Palantir
|
|
70 # make
|
|
71
|
|
72
|
|
73
|
|
74 Native Windows build with MinGW
|
|
75 -------------------------------
|
|
76
|
|
77 # cd [...]/PalantirBuild
|
|
78 # cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=DEBUG [...]/Palantir
|
|
79 # mingw32-make
|