Mercurial > hg > orthanc-stone
annotate OrthancStone/Resources/CMake/GlewConfiguration.cmake @ 1995:f2a094fa8c33
updated TODO
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 01 Nov 2022 19:04:34 +0100 |
parents | 7053b8a0aaec |
children | 07964689cb0b |
rev | line source |
---|---|
613
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 # Stone of Orthanc |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 # Department, University Hospital of Liege, Belgium |
1871
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium |
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
613
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 # |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 # This program is free software: you can redistribute it and/or |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1597
diff
changeset
|
8 # modify it under the terms of the GNU Lesser General Public License |
613
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 # as published by the Free Software Foundation, either version 3 of |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 # the License, or (at your option) any later version. |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 # |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 # This program is distributed in the hope that it will be useful, but |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 # WITHOUT ANY WARRANTY; without even the implied warranty of |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1597
diff
changeset
|
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1597
diff
changeset
|
15 # Lesser General Public License for more details. |
1597
f9e3a9c21c0f
removed annoying whitespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
16 # |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1597
diff
changeset
|
17 # You should have received a copy of the GNU Lesser General Public |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1597
diff
changeset
|
18 # License along with this program. If not, see |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1597
diff
changeset
|
19 # <http://www.gnu.org/licenses/>. |
613
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 if (STATIC_BUILD OR NOT USE_SYSTEM_GLEW) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 SET(GLEW_SOURCES_DIR ${CMAKE_BINARY_DIR}/glew-2.1.0) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 SET(GLEW_URL "http://orthanc.osimis.io/ThirdPartyDownloads/glew-2.1.0.tgz") |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 SET(GLEW_MD5 "b2ab12331033ddfaa50dc39345343980") |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 DownloadPackage(${GLEW_MD5} ${GLEW_URL} "${GLEW_SOURCES_DIR}") |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 set(GLEW_SOURCES |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 ${GLEW_SOURCES_DIR}/src/glew.c |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 ) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 include_directories(${GLEW_SOURCES_DIR}/include) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 add_definitions( |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 -DGLEW_STATIC=1 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 ) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 else() |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 include(FindGLEW) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 if (NOT GLEW_FOUND) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 message(FATAL_ERROR "Please install the libglew-dev package") |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 endif() |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 include_directories(${GLEW_INCLUDE_DIRS}) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 link_libraries(${GLEW_LIBRARIES}) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 endif() |