Mercurial > hg > orthanc-stone
annotate Resources/CMake/GlewConfiguration.cmake @ 967:e3234630df9c toa2019082801
Removed pragma-no-cache header that seems to be useless (and even nefarious)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 28 Aug 2019 10:54:15 +0200 |
parents | 412a2d01a189 |
children | 2d8ab34c8c91 |
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 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 # Copyright (C) 2017-2019 Osimis S.A., Belgium |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 # |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 # This program is free software: you can redistribute it and/or |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 # modify it under the terms of the GNU Affero General Public License |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 # 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
|
9 # the License, or (at your option) any later version. |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 # |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 # 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
|
12 # WITHOUT ANY WARRANTY; without even the implied warranty of |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 # Affero General Public License for more details. |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 # |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 # You should have received a copy of the GNU Affero General Public License |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 if (STATIC_BUILD OR NOT USE_SYSTEM_GLEW) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 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
|
22 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
|
23 SET(GLEW_MD5 "b2ab12331033ddfaa50dc39345343980") |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 DownloadPackage(${GLEW_MD5} ${GLEW_URL} "${GLEW_SOURCES_DIR}") |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 set(GLEW_SOURCES |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 ${GLEW_SOURCES_DIR}/src/glew.c |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 ) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 include_directories(${GLEW_SOURCES_DIR}/include) |
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 add_definitions( |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 -DGLEW_STATIC=1 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 ) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 else() |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 include(FindGLEW) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 if (NOT GLEW_FOUND) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 message(FATAL_ERROR "Please install the libglew-dev package") |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 endif() |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 include_directories(${GLEW_INCLUDE_DIRS}) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 link_libraries(${GLEW_LIBRARIES}) |
412a2d01a189
automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 endif() |