Package: orthanc-dicomweb / 0.3+dfsg-1

cmake Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Description: Fix the linking of the shared library
Author: Sebastien Jodogne <s.jodogne@gmail.com>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: OrthancDicomWeb-0.3/CMakeLists.txt
===================================================================
--- OrthancDicomWeb-0.3.orig/CMakeLists.txt
+++ OrthancDicomWeb-0.3/CMakeLists.txt
@@ -47,7 +47,7 @@ include(CheckIncludeFileCXX)
 include(CheckLibraryExists)
 include(FindPythonInterp)
 include(${ORTHANC_ROOT}/Resources/CMake/Compiler.cmake)
-include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
+#include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
 
 include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake)
 include(${ORTHANC_ROOT}/Resources/CMake/GoogleTestConfiguration.cmake)
@@ -136,15 +136,13 @@ add_library(OrthancDicomWeb SHARED ${COR
   ${AUTOGENERATED_SOURCES}
   )
 
-target_link_libraries(OrthancDicomWeb ${GDCM_LIBRARIES})
-
 message("Setting the version of the library to ${ORTHANC_DICOM_WEB_VERSION}")
 
 add_definitions(-DORTHANC_DICOM_WEB_VERSION="${ORTHANC_DICOM_WEB_VERSION}")
 
-set_target_properties(OrthancDicomWeb PROPERTIES 
-  VERSION ${ORTHANC_DICOM_WEB_VERSION} 
-  SOVERSION ${ORTHANC_DICOM_WEB_VERSION}
+set_target_properties(OrthancDicomWeb PROPERTIES
+  NO_SONAME ON
+  LINK_FLAGS "-lgdcmDICT -lgdcmDSED -lgdcmMSFF -lgdcmCommon -luuid -Wl,-soname,libOrthancDicomWeb.so.${ORTHANC_DICOM_WEB_VERSION}"
   )
 
 install(
Index: OrthancDicomWeb-0.3/Orthanc/Resources/CMake/Compiler.cmake
===================================================================
--- OrthancDicomWeb-0.3.orig/Orthanc/Resources/CMake/Compiler.cmake
+++ OrthancDicomWeb-0.3/Orthanc/Resources/CMake/Compiler.cmake
@@ -60,7 +60,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux
   # Remove the "-rdynamic" option
   # http://www.mail-archive.com/cmake@cmake.org/msg08837.html
   set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
-  link_libraries(uuid pthread rt)
+  link_libraries(pthread rt)
 
   if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")