Mercurial > hg > orthanc
annotate Resources/CMake/JsonCppConfiguration.cmake @ 1762:2b91363cc1d1 db-changes
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Oct 2015 11:25:45 +0100 |
parents | fbf763bb1fa3 |
children | c1053112b323 |
rev | line source |
---|---|
735 | 1 if (STATIC_BUILD OR NOT USE_SYSTEM_JSONCPP) |
1502
5e9c40419fb9
Upgrade to JsonCpp 0.10.5 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1414
diff
changeset
|
2 set(JSONCPP_SOURCES_DIR ${CMAKE_BINARY_DIR}/jsoncpp-0.10.5) |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1502
diff
changeset
|
3 set(JSONCPP_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/jsoncpp-0.10.5.tar.gz") |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1502
diff
changeset
|
4 set(JSONCPP_MD5 "db146bac5a126ded9bd728ab7b61ed6b") |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1502
diff
changeset
|
5 |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1502
diff
changeset
|
6 DownloadPackage(${JSONCPP_MD5} ${JSONCPP_URL} "${JSONCPP_SOURCES_DIR}") |
735 | 7 |
1414 | 8 set(JSONCPP_SOURCES |
735 | 9 ${JSONCPP_SOURCES_DIR}/src/lib_json/json_reader.cpp |
10 ${JSONCPP_SOURCES_DIR}/src/lib_json/json_value.cpp | |
11 ${JSONCPP_SOURCES_DIR}/src/lib_json/json_writer.cpp | |
12 ) | |
13 | |
14 include_directories( | |
15 ${JSONCPP_SOURCES_DIR}/include | |
16 ) | |
17 | |
18 source_group(ThirdParty\\JsonCpp REGULAR_EXPRESSION ${JSONCPP_SOURCES_DIR}/.*) | |
19 | |
20 else() | |
1344 | 21 find_path(JSONCPP_INCLUDE_DIR json/reader.h |
22 /usr/include/jsoncpp | |
23 /usr/local/include/jsoncpp | |
24 ) | |
25 | |
26 message("JsonCpp include dir: ${JSONCPP_INCLUDE_DIR}") | |
27 include_directories(${JSONCPP_INCLUDE_DIR}) | |
735 | 28 link_libraries(jsoncpp) |
29 | |
1405 | 30 CHECK_INCLUDE_FILE_CXX(${JSONCPP_INCLUDE_DIR}/json/reader.h HAVE_JSONCPP_H) |
31 if (NOT HAVE_JSONCPP_H) | |
32 message(FATAL_ERROR "Please install the libjsoncpp-dev package") | |
33 endif() | |
34 | |
735 | 35 endif() |