Mercurial > hg > orthanc
annotate Resources/CMake/PugixmlConfiguration.cmake @ 1976:325772dadcd6
Macro "__linux" (now obsolete) replaced by macro "__linux__"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 14 Apr 2016 17:34:43 +0200 |
parents | fbf763bb1fa3 |
children | 0108ac01fc8e |
rev | line source |
---|---|
1045
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 if (USE_PUGIXML) |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 add_definitions(-DORTHANC_PUGIXML_ENABLED=1) |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 if (STATIC_BUILD OR NOT USE_SYSTEM_PUGIXML) |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 set(PUGIXML_SOURCES_DIR ${CMAKE_BINARY_DIR}/pugixml-1.4) |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1414
diff
changeset
|
6 set(PUGIXML_MD5 "7c56c91cfe3ecdee248a8e4892ef5781") |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1414
diff
changeset
|
7 set(PUGIXML_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/pugixml-1.4.tar.gz") |
1045
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1414
diff
changeset
|
9 DownloadPackage(${PUGIXML_MD5} ${PUGIXML_URL} "${PUGIXML_SOURCES_DIR}") |
1045
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 include_directories( |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 ${PUGIXML_SOURCES_DIR}/src |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 ) |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 set(PUGIXML_SOURCES |
1414 | 16 #${PUGIXML_SOURCES_DIR}/src/vlog_is_on.cc |
1045
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 ${PUGIXML_SOURCES_DIR}/src/pugixml.cpp |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 ) |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 else() |
1077 | 21 CHECK_INCLUDE_FILE_CXX(pugixml.hpp HAVE_PUGIXML_H) |
1045
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 if (NOT HAVE_PUGIXML_H) |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 message(FATAL_ERROR "Please install the libpugixml-dev package") |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 endif() |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 link_libraries(pugixml) |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 endif() |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 else() |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 add_definitions(-DORTHANC_PUGIXML_ENABLED=0) |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 endif() |