diff options
Diffstat (limited to 'Tests/Framework')
-rw-r--r-- | Tests/Framework/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/Framework/bar.cxx | 5 | ||||
-rw-r--r-- | Tests/Framework/foo.cxx | 6 |
3 files changed, 13 insertions, 8 deletions
diff --git a/Tests/Framework/CMakeLists.txt b/Tests/Framework/CMakeLists.txt index 3aac24d..74871bc 100644 --- a/Tests/Framework/CMakeLists.txt +++ b/Tests/Framework/CMakeLists.txt @@ -1,11 +1,11 @@ project(Framework) add_library(foo SHARED foo.cxx) set_target_properties(foo PROPERTIES - FRAMEWORK TRUE - FRAMEWORK_PUBLIC_HEADERS "foo.h;foo2.h" - FRAMEWORK_VERSION ver2 - FRAMEWORK_RESOURCES "" -# VERSION 1.2 + FRAMEWORK TRUE + FRAMEWORK_PUBLIC_HEADERS "foo.h;foo2.h" + FRAMEWORK_VERSION ver2 + FRAMEWORK_RESOURCES "" ) add_executable(bar bar.cxx) target_link_libraries(bar foo) + diff --git a/Tests/Framework/bar.cxx b/Tests/Framework/bar.cxx index 37c132a..5c9d612 100644 --- a/Tests/Framework/bar.cxx +++ b/Tests/Framework/bar.cxx @@ -1,4 +1,7 @@ -void foo(); +#ifdef _WIN32 +# define CM_TEST_LIB_IMPORT __declspec( dllimport ) +#endif +CM_TEST_LIB_IMPORT void foo(); int main() { foo(); diff --git a/Tests/Framework/foo.cxx b/Tests/Framework/foo.cxx index 62acbb7..521f6f2 100644 --- a/Tests/Framework/foo.cxx +++ b/Tests/Framework/foo.cxx @@ -1,6 +1,8 @@ #include <stdio.h> - -void foo() +#ifdef _WIN32 +# define CM_TEST_LIB_EXPORT __declspec( dllexport ) +#endif +CM_TEST_LIB_EXPORT void foo() { printf("foo\n"); } |