Mercurial > hg > orthanc
annotate Resources/CMake/PugixmlConfiguration.cmake @ 2120:4b02ec79728a
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 07 Nov 2016 11:19:19 +0100 |
parents | 0108ac01fc8e |
children | dd609a99d39a |
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 |
2113
0108ac01fc8e
added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1537
diff
changeset
|
29 source_group(ThirdParty\\pugixml REGULAR_EXPRESSION ${PUGIXML_SOURCES_DIR}/.*) |
0108ac01fc8e
added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1537
diff
changeset
|
30 |
1045
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 else() |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 add_definitions(-DORTHANC_PUGIXML_ENABLED=0) |
0bfeeb6d340f
json to xml conversion with pugixml
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 endif() |