summaryrefslogtreecommitdiffstats
path: root/Tests/Jump/Library/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Jump/Library/Shared')
-rw-r--r--Tests/Jump/Library/Shared/CMakeLists.txt26
-rw-r--r--Tests/Jump/Library/Shared/jumpShared.cxx10
2 files changed, 36 insertions, 0 deletions
diff --git a/Tests/Jump/Library/Shared/CMakeLists.txt b/Tests/Jump/Library/Shared/CMakeLists.txt
new file mode 100644
index 0000000..a37299a
--- /dev/null
+++ b/Tests/Jump/Library/Shared/CMakeLists.txt
@@ -0,0 +1,26 @@
+add_library(jumpShared SHARED jumpShared.cxx)
+
+if(WIN32 OR CYGWIN)
+ set(SHARED_MUST_BE_IN_EXE_DIR 1)
+endif()
+
+if(APPLE)
+ set(SHARED_MUST_BE_IN_EXE_DIR 1)
+endif()
+
+if(SHARED_MUST_BE_IN_EXE_DIR)
+ set(LIB_NAME
+ ${CMAKE_SHARED_LIBRARY_PREFIX}jumpShared${CMAKE_SHARED_LIBRARY_SUFFIX})
+ set(EXE_DIR ${Jump_BINARY_DIR}/Executable)
+ if(EXECUTABLE_OUTPUT_PATH)
+ set(EXE_DIR ${EXECUTABLE_OUTPUT_PATH})
+ endif()
+ set(LIB_DIR ${Jump_BINARY_DIR}/Library/Shared)
+ if(LIBRARY_OUTPUT_PATH)
+ set(LIB_DIR ${LIBRARY_OUTPUT_PATH})
+ endif()
+ add_custom_command(TARGET jumpShared
+ POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy
+ ${LIB_DIR}/${CMAKE_CFG_INTDIR}/${LIB_NAME}
+ ${EXE_DIR}/${CMAKE_CFG_INTDIR}/${LIB_NAME})
+endif()
diff --git a/Tests/Jump/Library/Shared/jumpShared.cxx b/Tests/Jump/Library/Shared/jumpShared.cxx
new file mode 100644
index 0000000..7c4dee9
--- /dev/null
+++ b/Tests/Jump/Library/Shared/jumpShared.cxx
@@ -0,0 +1,10 @@
+#ifdef _WIN32
+#define JUMP_EXPORT __declspec(dllexport)
+#else
+#define JUMP_EXPORT
+#endif
+
+JUMP_EXPORT int jumpShared()
+{
+ return 0;
+}