diff options
Diffstat (limited to 'Tests/Complex/Library')
-rw-r--r-- | Tests/Complex/Library/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/Complex/Library/testConly.c | 6 | ||||
-rw-r--r-- | Tests/Complex/Library/testConly.h | 12 |
3 files changed, 20 insertions, 0 deletions
diff --git a/Tests/Complex/Library/CMakeLists.txt b/Tests/Complex/Library/CMakeLists.txt index c01f501..19cb6cd 100644 --- a/Tests/Complex/Library/CMakeLists.txt +++ b/Tests/Complex/Library/CMakeLists.txt @@ -26,6 +26,8 @@ ADD_LIBRARY(CMakeTestLibrary LibrarySources) SOURCE_FILES(SharedLibrarySources sharedFile) ADD_LIBRARY(CMakeTestLibraryShared SHARED SharedLibrarySources) +ADD_LIBRARY(CMakeTestCLibraryShared SHARED testConly.c) + # # Attach a post-build custom-command to the lib. # It runs ${CREATE_FILE_EXE} which will create a file. diff --git a/Tests/Complex/Library/testConly.c b/Tests/Complex/Library/testConly.c new file mode 100644 index 0000000..d2d5294 --- /dev/null +++ b/Tests/Complex/Library/testConly.c @@ -0,0 +1,6 @@ +#include "sharedFile.h" + +int CsharedFunction() +{ + return 1; +} diff --git a/Tests/Complex/Library/testConly.h b/Tests/Complex/Library/testConly.h new file mode 100644 index 0000000..8553a6b --- /dev/null +++ b/Tests/Complex/Library/testConly.h @@ -0,0 +1,12 @@ +#if defined(_WIN32) || defined(WIN32) /* Win32 version */ +#ifdef CMakeTestLibraryShared_EXPORTS +# define CMakeTest_EXPORT __declspec(dllexport) +#else +# define CMakeTest_EXPORT __declspec(dllimport) +#endif +#else +// unix needs nothing +#define CMakeTest_EXPORT +#endif + +CMakeTest_EXPORT int CsharedFunction(); |