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()
-
