changeset 522:81cb140941a5 laaw

compiling the dll
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Jul 2013 16:41:48 +0200
parents cd7d4842851c
children ff8bee6459cd
files CMakeLists.txt
diffstat 1 files changed, 50 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Fri Jul 19 16:36:24 2013 +0200
+++ b/CMakeLists.txt	Fri Jul 19 16:41:48 2013 +0200
@@ -273,59 +273,59 @@
 ## Create the standalone DLL containing the Orthanc Client API
 #####################################################################
 
-# include_directories(${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw)
+include_directories(${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw)
 
-# if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
-#   if (${CMAKE_SIZEOF_VOID_P} EQUAL 4)
-#     set(ORTHANC_CPP_CLIENT_DEF ${ORTHANC_ROOT}/OrthancCppClient/Package/Build/Windows32.def)
-#   elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8)
-#     set(ORTHANC_CPP_CLIENT_DEF ${ORTHANC_ROOT}/OrthancCppClient/Package/Build/Windows64.def)
-#   else()
-#     message(FATAL_ERROR "Support your platform here")
-#   endif()
-# endif()
+if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+  if (${CMAKE_SIZEOF_VOID_P} EQUAL 4)
+    set(ORTHANC_CPP_CLIENT_DEF ${ORTHANC_ROOT}/OrthancCppClient/Package/Build/Windows32.def)
+  elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8)
+    set(ORTHANC_CPP_CLIENT_DEF ${ORTHANC_ROOT}/OrthancCppClient/Package/Build/Windows64.def)
+  else()
+    message(FATAL_ERROR "Support your platform here")
+  endif()
+endif()
 
-# add_library(OrthancCppClient SHARED
-#   ${ORTHANC_ROOT}/Core/OrthancException.cpp
-#   ${ORTHANC_ROOT}/Core/Enumerations.cpp
-#   ${ORTHANC_ROOT}/Core/Toolbox.cpp
-#   ${ORTHANC_ROOT}/Core/HttpClient.cpp
-#   ${ORTHANC_ROOT}/Core/MultiThreading/ArrayFilledByThreads.cpp
-#   ${ORTHANC_ROOT}/Core/MultiThreading/ThreadedCommandProcessor.cpp
-#   ${ORTHANC_ROOT}/Core/MultiThreading/SharedMessageQueue.cpp
-#   ${ORTHANC_ROOT}/Core/FileFormats/PngReader.cpp
-#   ${ORTHANC_ROOT}/OrthancCppClient/OrthancConnection.cpp
-#   ${ORTHANC_ROOT}/OrthancCppClient/Series.cpp
-#   ${ORTHANC_ROOT}/OrthancCppClient/Study.cpp
-#   ${ORTHANC_ROOT}/OrthancCppClient/Instance.cpp
-#   ${ORTHANC_ROOT}/OrthancCppClient/Patient.cpp
-#   ${ORTHANC_ROOT}/OrthancCppClient/Package/SharedLibrary.cpp
-#   ${ORTHANC_ROOT}/Resources/sha1/sha1.cpp
-#   ${ORTHANC_ROOT}/Resources/md5/md5.c
-#   ${ORTHANC_ROOT}/Resources/base64/base64.cpp
-#   ${ORTHANC_CPP_CLIENT_DEF}
-#   ${THIRD_PARTY_SOURCES}
-#   ${OPENSSL_SOURCES}
-#   ${CURL_SOURCES}
-#   )
+add_library(OrthancCppClient SHARED
+  ${ORTHANC_ROOT}/Core/OrthancException.cpp
+  ${ORTHANC_ROOT}/Core/Enumerations.cpp
+  ${ORTHANC_ROOT}/Core/Toolbox.cpp
+  ${ORTHANC_ROOT}/Core/HttpClient.cpp
+  ${ORTHANC_ROOT}/Core/MultiThreading/ArrayFilledByThreads.cpp
+  ${ORTHANC_ROOT}/Core/MultiThreading/ThreadedCommandProcessor.cpp
+  ${ORTHANC_ROOT}/Core/MultiThreading/SharedMessageQueue.cpp
+  ${ORTHANC_ROOT}/Core/FileFormats/PngReader.cpp
+  ${ORTHANC_ROOT}/OrthancCppClient/OrthancConnection.cpp
+  ${ORTHANC_ROOT}/OrthancCppClient/Series.cpp
+  ${ORTHANC_ROOT}/OrthancCppClient/Study.cpp
+  ${ORTHANC_ROOT}/OrthancCppClient/Instance.cpp
+  ${ORTHANC_ROOT}/OrthancCppClient/Patient.cpp
+  ${ORTHANC_ROOT}/OrthancCppClient/Package/SharedLibrary.cpp
+  ${ORTHANC_ROOT}/Resources/sha1/sha1.cpp
+  ${ORTHANC_ROOT}/Resources/md5/md5.c
+  ${ORTHANC_ROOT}/Resources/base64/base64.cpp
+  ${ORTHANC_CPP_CLIENT_DEF}
+  ${THIRD_PARTY_SOURCES}
+  ${OPENSSL_SOURCES}
+  ${CURL_SOURCES}
+  )
 
-# if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-#   set_target_properties(OrthancCppClient
-#     PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--version-script=${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw/VersionScript.map"
-#     )
-#   target_link_libraries(OrthancCppClient pthread)
-# elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
-#   if (${CMAKE_COMPILER_IS_GNUCXX})
-#     set_target_properties(OrthancCppClient
-#       PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++"
-#       )
-#     target_link_libraries(OrthancCppClient ws2_32)
-#   else()
-#     message(FATAL_ERROR "Support Visual Studio here")
-#   endif()
-# else()
-#   message(FATAL_ERROR "Support your platform here")
-# endif()
+if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+  set_target_properties(OrthancCppClient
+    PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed -Wl,--version-script=${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw/VersionScript.map"
+    )
+  target_link_libraries(OrthancCppClient pthread)
+elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+  if (${CMAKE_COMPILER_IS_GNUCXX})
+    set_target_properties(OrthancCppClient
+      PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++"
+      )
+    target_link_libraries(OrthancCppClient ws2_32)
+  else()
+    message(FATAL_ERROR "Support Visual Studio here")
+  endif()
+else()
+  message(FATAL_ERROR "Support your platform here")
+endif()