blob: cbade039f4038da6321468cd9288b37aa5e4026c (
plain)
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
|
diff --git a/libraries/vlfeat/CMakeLists.txt b/libraries/vlfeat/CMakeLists.txt
index d248bcf..24469c9 100644
--- a/libraries/vlfeat/CMakeLists.txt
+++ b/libraries/vlfeat/CMakeLists.txt
@@ -16,11 +16,11 @@ set(vl_sources
set_source_files_properties(${vl_sources} PROPERTIES LANGUAGE C)
if (MSVC)
- add_definitions(-DVL_BUILD_DLL)
+ #add_definitions(-DVL_BUILD_DLL)
add_definitions(-DVL_DISABLE_SSE2)
endif (MSVC)
-add_library(vlfeat SHARED ${vl_sources})
+add_library(vlfeat ${vl_sources})
install(TARGETS vlfeat
EXPORT TheiaExport
RUNTIME DESTINATION bin
diff --git a/libraries/vlfeat/vl/host.h b/libraries/vlfeat/vl/host.h
index 4fdb86c..01c1134 100644
--- a/libraries/vlfeat/vl/host.h
+++ b/libraries/vlfeat/vl/host.h
@@ -316,18 +316,24 @@ defined(__DOXYGEN__)
# define snprintf _snprintf
# define isnan _isnan
#endif
-# ifdef VL_BUILD_DLL
+# if defined(VL_BUILD_DLL)
# ifdef __cplusplus
# define VL_EXPORT extern "C" __declspec(dllexport)
# else
# define VL_EXPORT extern __declspec(dllexport)
# endif
-# else
+# elif defined(VL_DLL)
# ifdef __cplusplus
# define VL_EXPORT extern "C" __declspec(dllimport)
# else
# define VL_EXPORT extern __declspec(dllimport)
# endif
+# else
+# ifdef __cplusplus
+# define VL_EXPORT extern "C"
+# else
+# define VL_EXPORT extern
+# endif
# endif
#endif
|