comparison LinuxCompilation.txt @ 4091:19a2f1d2b816 framework

moved CMakeLists.txt for the server to the OrthancServer folder
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Jun 2020 07:30:50 +0200
parents c23ef85c7d9c
children d633e5bb7ba3
comparison
equal deleted inserted replaced
4090:160ec8417874 4091:19a2f1d2b816
17 package for libuuid ("uuid-dev" in Debian) are installed. 17 package for libuuid ("uuid-dev" in Debian) are installed.
18 18
19 19
20 We now make the assumption that Orthanc source code is placed in the 20 We now make the assumption that Orthanc source code is placed in the
21 folder "~/Orthanc" and that the binaries will be compiled to 21 folder "~/Orthanc" and that the binaries will be compiled to
22 "~/OrthancBuild". To build binaries with debug information: 22 "~/Orthanc/Build". To build binaries with debug information:
23 23
24 # cd ~/OrthancBuild 24 # cd ./Build
25 # cmake -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Debug ~/Orthanc 25 # cmake -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Debug ../OrthancServer/
26 # make 26 # make
27 # make doc 27 # make doc
28 28
29 29
30 To build a release version: 30 To build a release version:
31 31
32 # cd ~/OrthancBuild 32 # cd ./Build
33 # cmake -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release ~/Orthanc 33 # cmake -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release ../OrthancServer/
34 # make 34 # make
35 # make doc 35 # make doc
36 36
37 37
38 Note 1- When the "STATIC_BUILD" option is set to "ON", the build tool 38 Note 1- When the "STATIC_BUILD" option is set to "ON", the build tool
39 will not ask you the permission to download packages from the 39 will not ask you the permission to download packages from the
40 Internet. 40 Internet.
41 41
42 Note 2- If the development package of libuuid was not installed when 42 Note 2- If the development package of libuuid was not installed when
43 first invoking cmake, you will have to manually remove the build 43 first invoking cmake, you will have to manually remove the build
44 directory ("rm -rf ~/OrthancBuild") after installing this package, 44 directory ("rm -rf ~/Orthanc/Build") after installing this package,
45 then run cmake again. 45 then run cmake again.
46 46
47 Note 3- To build the documentation, you will have to install doxygen. 47 Note 3- To build the documentation, you will have to install doxygen.
48 48
49 49
54 libraries of your system (the "STATIC_BUILD" option is set to 54 libraries of your system (the "STATIC_BUILD" option is set to
55 "OFF"). This greatly speeds up the compilation. This is also required 55 "OFF"). This greatly speeds up the compilation. This is also required
56 when building packages for GNU/Linux distributions. Because using 56 when building packages for GNU/Linux distributions. Because using
57 system libraries is the default behavior, you just have to use: 57 system libraries is the default behavior, you just have to use:
58 58
59 # cd ~/OrthancBuild 59 # cd ./Build
60 # cmake -DCMAKE_BUILD_TYPE=Debug ~/Orthanc 60 # cmake -DCMAKE_BUILD_TYPE=Debug ../OrthancServer
61 # make 61 # make
62 62
63 Note that to build the documentation, you will have to install doxygen. 63 Note that to build the documentation, you will have to install doxygen.
64 64
65 However, on some GNU/Linux distributions, it is still required to 65 However, on some GNU/Linux distributions, it is still required to
87 # cmake -DALLOW_DOWNLOADS=ON \ 87 # cmake -DALLOW_DOWNLOADS=ON \
88 -DUSE_SYSTEM_CIVETWEB=OFF \ 88 -DUSE_SYSTEM_CIVETWEB=OFF \
89 -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \ 89 -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \
90 -DDCMTK_LIBRARIES=dcmjpls \ 90 -DDCMTK_LIBRARIES=dcmjpls \
91 -DCMAKE_BUILD_TYPE=Release \ 91 -DCMAKE_BUILD_TYPE=Release \
92 ~/Orthanc 92 ../OrthancServer/
93 # make
93 94
94 Note: Have also a look at the official package: 95 Note: Have also a look at the official package:
95 http://anonscm.debian.org/viewvc/debian-med/trunk/packages/orthanc/trunk/debian/ 96 http://anonscm.debian.org/viewvc/debian-med/trunk/packages/orthanc/trunk/debian/
96 97
97 98
109 -DUSE_SYSTEM_CIVETWEB=OFF \ 110 -DUSE_SYSTEM_CIVETWEB=OFF \
110 -DUSE_SYSTEM_JSONCPP=OFF \ 111 -DUSE_SYSTEM_JSONCPP=OFF \
111 -DUSE_SYSTEM_LUA=OFF \ 112 -DUSE_SYSTEM_LUA=OFF \
112 -DDCMTK_LIBRARIES=dcmjpls \ 113 -DDCMTK_LIBRARIES=dcmjpls \
113 -DCMAKE_BUILD_TYPE=Release \ 114 -DCMAKE_BUILD_TYPE=Release \
114 ~/Orthanc 115 ../OrthancServer/
115 # make 116 # make
116 117
117 118
118 SUPPORTED - Ubuntu 16.04 LTS 119 SUPPORTED - Ubuntu 16.04 LTS
119 ---------------------------- 120 ----------------------------
127 # cmake -DALLOW_DOWNLOADS=ON \ 128 # cmake -DALLOW_DOWNLOADS=ON \
128 -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \ 129 -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \
129 -DUSE_SYSTEM_CIVETWEB=OFF \ 130 -DUSE_SYSTEM_CIVETWEB=OFF \
130 -DDCMTK_LIBRARIES=dcmjpls \ 131 -DDCMTK_LIBRARIES=dcmjpls \
131 -DCMAKE_BUILD_TYPE=Release \ 132 -DCMAKE_BUILD_TYPE=Release \
132 ~/Orthanc 133 ../OrthancServer/
133 # make 134 # make
134 135
135 136
136 NB: Instructions to use clang and ninja: 137 NB: Instructions to use clang and ninja:
137 138
140 -DALLOW_DOWNLOADS=ON \ 141 -DALLOW_DOWNLOADS=ON \
141 -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \ 142 -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \
142 -DUSE_SYSTEM_CIVETWEB=OFF \ 143 -DUSE_SYSTEM_CIVETWEB=OFF \
143 -DDCMTK_LIBRARIES=dcmjpls \ 144 -DDCMTK_LIBRARIES=dcmjpls \
144 -DCMAKE_BUILD_TYPE=Release \ 145 -DCMAKE_BUILD_TYPE=Release \
145 ~/Orthanc 146 ../OrthancServer/
146 # ninja 147 # ninja
147 148
148 149
149 SUPPORTED - Ubuntu 18.04 LTS 150 SUPPORTED - Ubuntu 18.04 LTS
150 ---------------------------- 151 ----------------------------
158 # cmake -DALLOW_DOWNLOADS=ON \ 159 # cmake -DALLOW_DOWNLOADS=ON \
159 -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \ 160 -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \
160 -DUSE_SYSTEM_CIVETWEB=OFF \ 161 -DUSE_SYSTEM_CIVETWEB=OFF \
161 -DDCMTK_LIBRARIES=dcmjpls \ 162 -DDCMTK_LIBRARIES=dcmjpls \
162 -DCMAKE_BUILD_TYPE=Release \ 163 -DCMAKE_BUILD_TYPE=Release \
163 ~/Orthanc 164 ../OrthancServer/
164 # make 165 # make
165 166
166 167
167 NB: A suitable environment for locales can be setup as follows: 168 NB: A suitable environment for locales can be setup as follows:
168 169
185 186
186 # cmake "-DDCMTK_LIBRARIES=CharLS" \ 187 # cmake "-DDCMTK_LIBRARIES=CharLS" \
187 -DENABLE_CIVETWEB=OFF \ 188 -DENABLE_CIVETWEB=OFF \
188 -DSYSTEM_MONGOOSE_USE_CALLBACKS=OFF \ 189 -DSYSTEM_MONGOOSE_USE_CALLBACKS=OFF \
189 -DCMAKE_BUILD_TYPE=Release \ 190 -DCMAKE_BUILD_TYPE=Release \
190 ~/Orthanc 191 ../OrthancServer/
192 # make
191 193
192 Note: Have also a look at the official package: 194 Note: Have also a look at the official package:
193 http://pkgs.fedoraproject.org/cgit/orthanc.git/tree/?h=f18 195 http://pkgs.fedoraproject.org/cgit/orthanc.git/tree/?h=f18
194 196
195 197
202 204
203 # cmake -DALLOW_DOWNLOADS=ON \ 205 # cmake -DALLOW_DOWNLOADS=ON \
204 -DUSE_SYSTEM_CIVETWEB=OFF \ 206 -DUSE_SYSTEM_CIVETWEB=OFF \
205 -DDCMTK_LIBRARIES="dcmdsig;charls;dcmjpls" \ 207 -DDCMTK_LIBRARIES="dcmdsig;charls;dcmjpls" \
206 -DCMAKE_BUILD_TYPE=Release \ 208 -DCMAKE_BUILD_TYPE=Release \
207 ~/Orthanc 209 ../OrthancServer/
210 # make
208 211
209 212
210 213
211 Other GNU/Linux distributions? 214 Other GNU/Linux distributions?
212 ------------------------------ 215 ------------------------------
245 Under GNU/Linux, you also have the opportunity to use "ccache" to 248 Under GNU/Linux, you also have the opportunity to use "ccache" to
246 dramatically decrease the compilation time when rebuilding 249 dramatically decrease the compilation time when rebuilding
247 Orthanc. This is especially useful for developers. To this end, you 250 Orthanc. This is especially useful for developers. To this end, you
248 would use: 251 would use:
249 252
250 # CC="ccache gcc" CXX="ccache g++" cmake ~/Orthanc [Other Options] 253 # CC="ccache gcc" CXX="ccache g++" cmake ../OrthancServer/ [Other Options]