File: build-static-ann.patch

package info (click to toggle)
elastix 4.7-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 51,444 kB
  • ctags: 11,825
  • sloc: cpp: 35,827; python: 530; sh: 227; makefile: 23
file content (39 lines) | stat: -rw-r--r-- 1,127 bytes parent folder | download | duplicates (2)
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
Description: Build convenience static ANN library
Author: Steve Robbins <smr@debian.org>
Forwarded: no

The ANN library sources are included with elastix to implement
KNNGraphAlphaMutualInformationMetric.  The ANN library reported isn't
meant to be shared (c.f. #602582) so we change the build procedure to
NOT install it, and therefore it must be built statically.



--- elastix-4.4.orig/src/Common/KNN/ann_1.1/CMakeLists.txt
+++ elastix-4.4/src/Common/KNN/ann_1.1/CMakeLists.txt
@@ -25,7 +25,7 @@
 )
 
 # Create the ANNlib library
-ADD_LIBRARY( ANNlib SHARED ${ANN_SRCS} )
+ADD_LIBRARY( ANNlib STATIC ${ANN_SRCS} )
 
 # Necessary, because in windows dll_export is needed for creating the
 # dll, but dll_import for using it in a program.
@@ -34,16 +34,3 @@
 # Group in IDE's like Visual Studio
 SET_PROPERTY( TARGET ANNlib PROPERTY FOLDER "libraries" )
 
-# Install
-IF( WIN32 )
-  INSTALL( TARGETS ANNlib
-    RUNTIME DESTINATION .
-    LIBRARY DESTINATION . )
-    #COMPONENT libraries )
-ELSE()
-  INSTALL( TARGETS ANNlib
-    RUNTIME DESTINATION bin
-    LIBRARY DESTINATION lib )
-    #COMPONENT libraries )
-ENDIF()
-