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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
This file is part of MXE.
See index.html for further information.
Disable building and installing dynamic libraries in the CMakeLists.txt file.
(The file unfortunately does not provide switches for this purpose.)
diff -uNr flann-1.7.1-src/src/cpp/CMakeLists.txt flann-1.7.1-src.patched/src/cpp/CMakeLists.txt
--- flann-1.7.1-src/src/cpp/CMakeLists.txt 2011-12-23 12:16:09.000000000 +0100
+++ flann-1.7.1-src.patched/src/cpp/CMakeLists.txt 2012-10-01 12:36:59.013191056 +0200
@@ -24,29 +24,29 @@
set_property(TARGET flann_cuda_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC)
endif()
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
- add_library(flann_cpp SHARED "")
- set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX)
- target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive)
-
- if (BUILD_CUDA_LIB)
- cuda_add_library(flann_cuda SHARED "")
- set_target_properties(flann_cuda PROPERTIES LINKER_LANGUAGE CXX)
- target_link_libraries(flann_cuda -Wl,-whole-archive flann_cuda_s -Wl,-no-whole-archive)
- # target_link_libraries(flann_cuda cudpp_x86_64)
- endif()
-else()
- add_library(flann_cpp SHARED ${CPP_SOURCES})
- if (BUILD_CUDA_LIB)
- cuda_add_library(flann_cuda SHARED ${CPP_SOURCES})
- endif()
-endif()
-
-set_target_properties(flann_cpp PROPERTIES
- VERSION ${FLANN_VERSION}
- SOVERSION ${FLANN_SOVERSION}
- DEFINE_SYMBOL FLANN_EXPORTS
-)
+#if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+# add_library(flann_cpp SHARED "")
+# set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX)
+# target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive)
+#
+# if (BUILD_CUDA_LIB)
+# cuda_add_library(flann_cuda SHARED "")
+# set_target_properties(flann_cuda PROPERTIES LINKER_LANGUAGE CXX)
+# target_link_libraries(flann_cuda -Wl,-whole-archive flann_cuda_s -Wl,-no-whole-archive)
+# # target_link_libraries(flann_cuda cudpp_x86_64)
+# endif()
+#else()
+# add_library(flann_cpp SHARED ${CPP_SOURCES})
+# if (BUILD_CUDA_LIB)
+# cuda_add_library(flann_cuda SHARED ${CPP_SOURCES})
+# endif()
+#endif()
+#
+#set_target_properties(flann_cpp PROPERTIES
+# VERSION ${FLANN_VERSION}
+# SOVERSION ${FLANN_SOVERSION}
+# DEFINE_SYMBOL FLANN_EXPORTS
+#)
if (BUILD_CUDA_LIB)
set_target_properties(flann_cuda PROPERTIES
@@ -57,12 +57,12 @@
endif()
-#debug libraries
-add_library(flann_cpp-gd SHARED ${CPP_SOURCES})
-set_target_properties(flann_cpp-gd PROPERTIES
- COMPILE_FLAGS ${CMAKE_CXX_FLAGS_DEBUG}
- DEFINE_SYMBOL FLANN_EXPORTS
-)
+##debug libraries
+#add_library(flann_cpp-gd SHARED ${CPP_SOURCES})
+#set_target_properties(flann_cpp-gd PROPERTIES
+# COMPILE_FLAGS ${CMAKE_CXX_FLAGS_DEBUG}
+# DEFINE_SYMBOL FLANN_EXPORTS
+#)
add_library(flann_cpp_s-gd STATIC ${CPP_SOURCES})
set_target_properties(flann_cpp_s-gd PROPERTIES COMPILE_FLAGS ${CMAKE_CXX_FLAGS_DEBUG})
@@ -108,34 +108,35 @@
endif()
set_property(TARGET flann_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC)
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
- add_library(flann SHARED "")
- set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX)
- target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive)
- else()
- add_library(flann SHARED ${C_SOURCES})
- endif()
-
- set_target_properties(flann PROPERTIES
- VERSION ${FLANN_VERSION}
- SOVERSION ${FLANN_SOVERSION}
- DEFINE_SYMBOL FLANN_EXPORTS
- )
+# if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+# add_library(flann SHARED "")
+# set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX)
+# target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive)
+# else()
+# add_library(flann SHARED ${C_SOURCES})
+# endif()
+#
+# set_target_properties(flann PROPERTIES
+# VERSION ${FLANN_VERSION}
+# SOVERSION ${FLANN_SOVERSION}
+# DEFINE_SYMBOL FLANN_EXPORTS
+# )
endif()
if(WIN32)
if (BUILD_C_BINDINGS)
- install (
- TARGETS flann
- RUNTIME DESTINATION share/flann/matlab
- )
+# install (
+# TARGETS flann
+# RUNTIME DESTINATION share/flann/matlab
+# )
endif()
endif(WIN32)
install (
- TARGETS flann_cpp flann_cpp_s flann_cpp-gd flann_cpp_s-gd
+# TARGETS flann_cpp flann_cpp_s flann_cpp-gd flann_cpp_s-gd
+ TARGETS flann_cpp_s flann_cpp_s-gd
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}
@@ -152,7 +153,8 @@
if (BUILD_C_BINDINGS)
install (
- TARGETS flann flann_s
+# TARGETS flann flann_s
+ TARGETS flann_s
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}
|