changeset 4099:bf1a17f12306

moving version scripts from OrthancFramework to OrthancServer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 06 Jul 2020 08:48:35 +0200
parents 64e92ffbba0f
children 90eaf36e6adf
files OrthancFramework/Resources/CMake/Compiler.cmake OrthancFramework/Resources/ExportedSymbolsPlugins.list OrthancFramework/Resources/VersionScriptPlugins.map OrthancServer/CMakeLists.txt OrthancServer/Plugins/Samples/Common/ExportedSymbolsPlugins.list OrthancServer/Plugins/Samples/Common/OrthancPlugins.cmake OrthancServer/Plugins/Samples/Common/VersionScriptPlugins.map OrthancServer/Plugins/Samples/ConnectivityChecks/CMakeLists.txt
diffstat 8 files changed, 24 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/Compiler.cmake	Wed Jul 01 17:22:55 2020 +0200
+++ b/OrthancFramework/Resources/CMake/Compiler.cmake	Mon Jul 06 08:48:35 2020 +0200
@@ -113,11 +113,6 @@
     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
   endif()
 
-  if (NOT DEFINED ENABLE_PLUGINS_VERSION_SCRIPT OR 
-      ENABLE_PLUGINS_VERSION_SCRIPT)
-    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/../VersionScriptPlugins.map")
-  endif()
-
   # Remove the "-rdynamic" option
   # http://www.mail-archive.com/cmake@cmake.org/msg08837.html
   set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
@@ -203,8 +198,6 @@
   endif()
 
 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
-  SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -exported_symbols_list ${CMAKE_CURRENT_LIST_DIR}/../ExportedSymbolsPlugins.list")
-
   add_definitions(
     -D_XOPEN_SOURCE=1
     )
--- a/OrthancFramework/Resources/ExportedSymbolsPlugins.list	Wed Jul 01 17:22:55 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-# This is the list of the symbols that must be exported by Orthanc
-# plugins, if targeting OS X
-
-_OrthancPluginInitialize
-_OrthancPluginFinalize
-_OrthancPluginGetName
-_OrthancPluginGetVersion
--- a/OrthancFramework/Resources/VersionScriptPlugins.map	Wed Jul 01 17:22:55 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-# This is a version-script for Orthanc plugins
-
-{
-global:
-  OrthancPluginInitialize;
-  OrthancPluginFinalize;
-  OrthancPluginGetName;
-  OrthancPluginGetVersion;
-
-local:
-  *;
-};
--- a/OrthancServer/CMakeLists.txt	Wed Jul 01 17:22:55 2020 +0200
+++ b/OrthancServer/CMakeLists.txt	Mon Jul 06 08:48:35 2020 +0200
@@ -49,6 +49,9 @@
 include(${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/CMake/VisualStudioPrecompiledHeaders.cmake)
 include(${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake)
 
+# To export the proper symbols in the sample plugins
+include(${CMAKE_SOURCE_DIR}/Plugins/Samples/Common/OrthancPluginsExports.cmake)
+
 
 #####################################################################
 ## List of source files
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancServer/Plugins/Samples/Common/ExportedSymbolsPlugins.list	Mon Jul 06 08:48:35 2020 +0200
@@ -0,0 +1,7 @@
+# This is the list of the symbols that must be exported by Orthanc
+# plugins, if targeting OS X
+
+_OrthancPluginInitialize
+_OrthancPluginFinalize
+_OrthancPluginGetName
+_OrthancPluginGetVersion
--- a/OrthancServer/Plugins/Samples/Common/OrthancPlugins.cmake	Wed Jul 01 17:22:55 2020 +0200
+++ b/OrthancServer/Plugins/Samples/Common/OrthancPlugins.cmake	Mon Jul 06 08:48:35 2020 +0200
@@ -5,6 +5,7 @@
 include(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/CMake/AutoGeneratedCode.cmake)
 include(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/CMake/DownloadPackage.cmake)
 include(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/CMake/Compiler.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/OrthancPluginsExports.cmake)
 
 
 if (CMAKE_COMPILER_IS_GNUCXX)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancServer/Plugins/Samples/Common/VersionScriptPlugins.map	Mon Jul 06 08:48:35 2020 +0200
@@ -0,0 +1,12 @@
+# This is a version-script for Orthanc plugins
+
+{
+global:
+  OrthancPluginInitialize;
+  OrthancPluginFinalize;
+  OrthancPluginGetName;
+  OrthancPluginGetVersion;
+
+local:
+  *;
+};
--- a/OrthancServer/Plugins/Samples/ConnectivityChecks/CMakeLists.txt	Wed Jul 01 17:22:55 2020 +0200
+++ b/OrthancServer/Plugins/Samples/ConnectivityChecks/CMakeLists.txt	Mon Jul 06 08:48:35 2020 +0200
@@ -9,6 +9,7 @@
 include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake)
 
 include(JavaScriptLibraries.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/../Common/OrthancPluginsExports.cmake)
 
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
   execute_process(