summaryrefslogtreecommitdiffstats
path: root/Tests/COnly
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-01-01 19:26:50 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-01-01 19:26:50 (GMT)
commitfe6721af84a5ec31f1b185fce1f6024a5d9c7e20 (patch)
treef963e38d7059df0daaca0957c716d55f6a04f8c6 /Tests/COnly
parent9bb153cbf15e65a559630bbd0dd43454692ea419 (diff)
downloadCMake-fe6721af84a5ec31f1b185fce1f6024a5d9c7e20.zip
CMake-fe6721af84a5ec31f1b185fce1f6024a5d9c7e20.tar.gz
CMake-fe6721af84a5ec31f1b185fce1f6024a5d9c7e20.tar.bz2
Shared library should export symbols on windows
Diffstat (limited to 'Tests/COnly')
-rw-r--r--Tests/COnly/libc2.c2
-rw-r--r--Tests/COnly/libc2.h12
2 files changed, 13 insertions, 1 deletions
diff --git a/Tests/COnly/libc2.c b/Tests/COnly/libc2.c
index 9a61837..0fd8956 100644
--- a/Tests/COnly/libc2.c
+++ b/Tests/COnly/libc2.c
@@ -1,3 +1,5 @@
+#include "libc2.h"
+
float LibC2Func()
{
return 1.0;
diff --git a/Tests/COnly/libc2.h b/Tests/COnly/libc2.h
index c2d47e5..bc26e01 100644
--- a/Tests/COnly/libc2.h
+++ b/Tests/COnly/libc2.h
@@ -1 +1,11 @@
-extern float LibC2Func();
+#ifdef _WIN32
+# ifdef c2_EXPORTS
+# define CM_TEST_LIB_EXPORT __declspec( dllexport )
+# else
+# define CM_TEST_LIB_EXPORT __declspec( dllimport )
+# endif
+#else
+# define CM_TEST_LIB_EXPORT
+#endif
+
+CM_TEST_LIB_EXPORT float LibC2Func();