~ubuntu-branches/ubuntu/wily/orthanc-postgresql/wily

« back to all changes in this revision

Viewing changes to Resources/CMake/BoostConfiguration.cmake

  • Committer: Package Import Robot
  • Author(s): Sebastien Jodogne, Sebastien Jodogne, Karsten Hilbert
  • Date: 2015-08-03 09:23:28 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20150803092328-swn3mnpj0fz34v42
Tags: 1.2-1
[ Sebastien Jodogne ]
* New upstream version

[ Karsten Hilbert ]
* Enhancements for README.Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
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_BOOST)
20
 
  set(BOOST_STATIC 1)
21
 
else()
22
 
  include(FindBoost)
23
 
  set(BOOST_STATIC 0)
24
 
  find_package(Boost COMPONENTS system)
25
 
 
26
 
  if (NOT Boost_FOUND)
27
 
    message(FATAL_ERROR "Unable to locate Boost on this system")
28
 
  endif()
29
 
 
30
 
  include_directories(${Boost_INCLUDE_DIRS})
31
 
  link_libraries(${Boost_LIBRARIES})
32
 
endif()
33
 
 
34
 
 
35
 
if (BOOST_STATIC)
36
 
  # Parameters for Boost 1.55.0
37
 
  set(BOOST_NAME boost_1_55_0)
38
 
  set(BOOST_BCP_SUFFIX bcpdigest-0.7.4)
39
 
  set(BOOST_MD5 "409f7a0e4fb1f5659d07114f3133b67b")
40
 
  set(BOOST_FILESYSTEM_SOURCES_DIR "${BOOST_NAME}/libs/filesystem/src")
41
 
  
42
 
  set(BOOST_SOURCES_DIR ${CMAKE_BINARY_DIR}/${BOOST_NAME})
43
 
  DownloadPackage(
44
 
    "${BOOST_MD5}"
45
 
    "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/${BOOST_NAME}_${BOOST_BCP_SUFFIX}.tar.gz"
46
 
    "${BOOST_SOURCES_DIR}"
47
 
    )
48
 
 
49
 
  add_definitions(
50
 
    # Static build of Boost
51
 
    -DBOOST_ALL_NO_LIB 
52
 
    -DBOOST_ALL_NOLIB 
53
 
    -DBOOST_DATE_TIME_NO_LIB 
54
 
    -DBOOST_THREAD_BUILD_LIB
55
 
    -DBOOST_PROGRAM_OPTIONS_NO_LIB
56
 
    -DBOOST_REGEX_NO_LIB
57
 
    -DBOOST_SYSTEM_NO_LIB
58
 
    -DBOOST_LOCALE_NO_LIB
59
 
    )
60
 
 
61
 
  if (${CMAKE_COMPILER_IS_GNUCXX})
62
 
    add_definitions(-isystem ${BOOST_SOURCES_DIR})
63
 
  endif()
64
 
 
65
 
  include_directories(
66
 
    ${BOOST_SOURCES_DIR}
67
 
    )
68
 
 
69
 
  list(APPEND BOOST_SOURCES
70
 
    ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp
71
 
    )
72
 
 
73
 
  source_group(ThirdParty\\Boost REGULAR_EXPRESSION ${BOOST_SOURCES_DIR}/.*)
74
 
endif()