Commit a34f6b17 authored by Sebastien Jodogne's avatar Sebastien Jodogne
Browse files

New upstream version 2.1

parent 964d04fe
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
repo: 1d7c4b96183115894767b40ed485045665f2c75c
node: 56dbbd7f5f785c5e343c60ab6a6e11b85d252615
branch: OrthancPostgreSQL-2.0
node: 8994bbdbc6d09f0824f789bb02e3d5b1b44e60e2
branch: OrthancPostgreSQL-2.1
latesttag: null
latesttagdistance: 88
latesttagdistance: 166
changessincelatesttag: 178
+9 −2
Original line number Diff line number Diff line
@@ -6,8 +6,15 @@ Authors
-------

* Sebastien Jodogne <s.jodogne@gmail.com>
  Department of Medical Physics

  Overall design and lead developer.

* Department of Medical Physics
  University Hospital of Liege
  4000 Liege
  Belgium

  Overall design and lead developer.
* Osimis S.A. <info@osimis.io>
  Rue des Chasseurs Ardennais 3
  4031 Liege 
  Belgium
+37 −30
Original line number Diff line number Diff line
# Orthanc - A Lightweight, RESTful DICOM Store
# Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
# Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
# Department, University Hospital of Liege, Belgium
# Copyright (C) 2017-2018 Osimis S.A., Belgium
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License
@@ -20,44 +21,51 @@ cmake_minimum_required(VERSION 2.8)

project(OrthancPostgreSQL)

set(ORTHANC_POSTGRESQL_VERSION "2.0")
set(ORTHANC_POSTGRESQL_VERSION "2.1")

if (ORTHANC_POSTGRESQL_VERSION STREQUAL "mainline")
  set(ORTHANC_FRAMEWORK_VERSION "mainline")
  set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
else()
  set(ORTHANC_FRAMEWORK_VERSION "1.3.2")
  set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
endif()


# Parameters of the build
set(STATIC_BUILD OFF CACHE BOOL "Static build of the third-party libraries (necessary for Windows)")
set(ALLOW_DOWNLOADS OFF CACHE BOOL "Allow CMake to download packages")
set(BUILD_UNIT_TESTS ON CACHE BOOL "Build UnitTests")
set(ORTHANC_FRAMEWORK_SOURCE "${ORTHANC_FRAMEWORK_DEFAULT_SOURCE}" CACHE STRING "Source of the Orthanc source code (can be \"hg\", \"archive\", \"web\" or \"path\")")
set(ORTHANC_FRAMEWORK_ARCHIVE "" CACHE STRING "Path to the Orthanc archive, if ORTHANC_FRAMEWORK_SOURCE is \"archive\"")
set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"")

# Advanced parameters to fine-tune linking against system libraries
set(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp")
set(USE_SYSTEM_BOOST ON CACHE BOOL "Use the system version of Boost")
set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
set(USE_SYSTEM_LIBPQ ON CACHE BOOL "Use the system version of the PostgreSQL client library")
set(USE_SYSTEM_ORTHANC_SDK ON CACHE BOOL "Use the system version of the Orthanc plugin SDK")

# Distribution-specific settings
set(USE_GTEST_DEBIAN_SOURCE_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)")
mark_as_advanced(USE_GTEST_DEBIAN_SOURCE_PACKAGE)

set(ORTHANC_ROOT ${CMAKE_SOURCE_DIR}/Orthanc)
include(CheckIncludeFiles)
include(CheckIncludeFileCXX)
include(CheckLibraryExists)
include(FindPythonInterp)
include(${ORTHANC_ROOT}/Resources/CMake/Compiler.cmake)
include(${ORTHANC_ROOT}/Resources/CMake/AutoGeneratedCode.cmake)
include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake)
include(${ORTHANC_ROOT}/Resources/CMake/JsonCppConfiguration.cmake)
include(${CMAKE_SOURCE_DIR}/Resources/CMake/PostgreSQLConfiguration.cmake)

if (BUILD_UNIT_TESTS)
  include(${ORTHANC_ROOT}/Resources/CMake/GoogleTestConfiguration.cmake)
endif()
# Download and setup the Orthanc framework
include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/DownloadOrthancFramework.cmake)

set(ORTHANC_FRAMEWORK_PLUGIN ON)
include(${ORTHANC_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake)

set(ENABLE_LOCALE OFF)         # Disable support for locales (notably in Boost)
set(ENABLE_GOOGLE_TEST ON)

include(${ORTHANC_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake)
include_directories(${ORTHANC_ROOT})


# The CMake script in "Graveyard" was used up to release 2.0. The new
# script makes auto-configuration of the variables.
include(${CMAKE_SOURCE_DIR}/Resources/CMake/PostgreSQLConfiguration.cmake)
#include(${CMAKE_SOURCE_DIR}/Resources/Graveyard/PostgreSQLConfiguration.cmake)


if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK)
  include_directories(${ORTHANC_ROOT}/Sdk-0.9.5)
  include_directories(${CMAKE_SOURCE_DIR}/Resources/Orthanc/Sdk-0.9.5)
else ()
  CHECK_INCLUDE_FILE_CXX(orthanc/OrthancCppDatabasePlugin.h HAVE_ORTHANC_H)
  if (NOT HAVE_ORTHANC_H)
@@ -66,7 +74,6 @@ else ()
endif()



if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
  link_libraries(secur32)

@@ -119,10 +126,10 @@ set(CORE_SOURCES
  ${CMAKE_SOURCE_DIR}/Core/PostgreSQLTransaction.cpp
  ${CMAKE_SOURCE_DIR}/Core/Configuration.cpp
  ${CMAKE_SOURCE_DIR}/Core/GlobalProperties.cpp
  ${AUTOGENERATED_DIR}/EmbeddedResources.cpp

  ${ORTHANC_CORE_SOURCES}
  ${LIBPQ_SOURCES}
  ${BOOST_SOURCES}
  ${JSONCPP_SOURCES}
  )

add_library(OrthancPostgreSQLStorage
@@ -136,7 +143,6 @@ add_library(OrthancPostgreSQLStorage
add_library(OrthancPostgreSQLIndex
  SHARED
  ${CORE_SOURCES}
  ${AUTOGENERATED_SOURCES}
  ${CMAKE_SOURCE_DIR}/IndexPlugin/PostgreSQLWrapper.cpp
  ${CMAKE_SOURCE_DIR}/IndexPlugin/Plugin.cpp
  ${INDEX_RESOURCES}
@@ -166,12 +172,13 @@ install(
if (BUILD_UNIT_TESTS)
  add_executable(UnitTests
    ${CORE_SOURCES}
    ${GTEST_SOURCES}
    ${AUTOGENERATED_SOURCES}
    ${CMAKE_SOURCE_DIR}/IndexPlugin/PostgreSQLWrapper.cpp
    ${CMAKE_SOURCE_DIR}/StoragePlugin/PostgreSQLStorageArea.cpp
    ${CMAKE_SOURCE_DIR}/UnitTestsSources/UnitTestsMain.cpp
    ${CMAKE_SOURCE_DIR}/UnitTestsSources/PostgreSQLTests.cpp
    ${CMAKE_SOURCE_DIR}/UnitTestsSources/PostgreSQLWrapperTests.cpp
    ${GOOGLE_TEST_SOURCES}
    )

  target_link_libraries(UnitTests ${GOOGLE_TEST_LIBRARIES})
endif()
+2 −1
Original line number Diff line number Diff line
/**
 * Orthanc - A Lightweight, RESTful DICOM Store
 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 * Department, University Hospital of Liege, Belgium
 * Copyright (C) 2017-2018 Osimis S.A., Belgium
 *
 * This program is free software: you can redistribute it and/or
 * modify it under the terms of the GNU Affero General Public License
+2 −1
Original line number Diff line number Diff line
/**
 * Orthanc - A Lightweight, RESTful DICOM Store
 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 * Department, University Hospital of Liege, Belgium
 * Copyright (C) 2017-2018 Osimis S.A., Belgium
 *
 * This program is free software: you can redistribute it and/or
 * modify it under the terms of the GNU Affero General Public License
Loading