comparison Resources/CMake/JsonCppConfiguration.cmake @ 0:02f7a0400a91

initial commit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 25 Feb 2015 13:45:35 +0100
parents
children b1eafe1e8511
comparison
equal deleted inserted replaced
-1:000000000000 0:02f7a0400a91
1 # Orthanc - A Lightweight, RESTful DICOM Store
2 # Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
3 # Department, University Hospital of Liege, Belgium
4 #
5 # This program is free software: you can redistribute it and/or
6 # modify it under the terms of the GNU Affero General Public License
7 # as published by the Free Software Foundation, either version 3 of
8 # the License, or (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Affero General Public License for more details.
14 #
15 # You should have received a copy of the GNU Affero General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18
19 if (STATIC_BUILD OR NOT USE_SYSTEM_JSONCPP)
20 set(JSONCPP_SOURCES_DIR ${CMAKE_BINARY_DIR}/jsoncpp-src-0.6.0-rc2)
21 DownloadPackage(
22 "363e2f4cbd3aeb63bf4e571f377400fb"
23 "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/jsoncpp-src-0.6.0-rc2.tar.gz"
24 "${JSONCPP_SOURCES_DIR}")
25
26 list(APPEND JSONCPP_SOURCES
27 ${JSONCPP_SOURCES_DIR}/src/lib_json/json_reader.cpp
28 ${JSONCPP_SOURCES_DIR}/src/lib_json/json_value.cpp
29 ${JSONCPP_SOURCES_DIR}/src/lib_json/json_writer.cpp
30 )
31
32 include_directories(
33 ${JSONCPP_SOURCES_DIR}/include
34 )
35
36 source_group(ThirdParty\\JsonCpp REGULAR_EXPRESSION ${JSONCPP_SOURCES_DIR}/.*)
37
38 else()
39 CHECK_INCLUDE_FILE_CXX(jsoncpp/json/reader.h HAVE_JSONCPP_H)
40 if (NOT HAVE_JSONCPP_H)
41 message(FATAL_ERROR "Please install the libjsoncpp-dev package")
42 endif()
43
44 include_directories(/usr/include/jsoncpp)
45 link_libraries(jsoncpp)
46
47 endif()