diff CMakeLists.txt @ 1396:ac4efabeb80c

Migration of the orthanc-client as a separate project
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 01 Jun 2015 11:15:55 +0200
parents b92de82e8869
children 1c8df4424437
line wrap: on
line diff
--- a/CMakeLists.txt	Sat May 30 10:03:07 2015 +0200
+++ b/CMakeLists.txt	Mon Jun 01 11:15:55 2015 +0200
@@ -14,7 +14,6 @@
 SET(STATIC_BUILD OFF CACHE BOOL "Static build of the third-party libraries (necessary for Windows)")
 SET(STANDALONE_BUILD ON CACHE BOOL "Standalone build (all the resources are embedded, necessary for releases)")
 SET(ENABLE_SSL ON CACHE BOOL "Include support for SSL")
-SET(BUILD_CLIENT_LIBRARY ON CACHE BOOL "Build the client library")
 SET(DCMTK_DICTIONARY_DIR "" CACHE PATH "Directory containing the DCMTK dictionaries \"dicom.dic\" and \"private.dic\" (only when using system version of DCMTK)") 
 SET(ALLOW_DOWNLOADS OFF CACHE BOOL "Allow CMake to download packages")
 SET(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests")
@@ -102,13 +101,11 @@
   Core/RestApi/RestApiPath.cpp
   Core/RestApi/RestApiOutput.cpp
   Core/RestApi/RestApi.cpp
-  Core/MultiThreading/ArrayFilledByThreads.cpp
   Core/MultiThreading/BagOfRunnablesBySteps.cpp
   Core/MultiThreading/Mutex.cpp
   Core/MultiThreading/ReaderWriterLock.cpp
   Core/MultiThreading/Semaphore.cpp
   Core/MultiThreading/SharedMessageQueue.cpp
-  Core/MultiThreading/ThreadedCommandProcessor.cpp
   Core/ImageFormats/ImageAccessor.cpp
   Core/ImageFormats/ImageBuffer.cpp
   Core/ImageFormats/ImageProcessing.cpp
@@ -125,12 +122,6 @@
   Core/Lua/LuaContext.cpp
   Core/Lua/LuaFunctionCall.cpp
 
-  OrthancCppClient/OrthancConnection.cpp
-  OrthancCppClient/Study.cpp
-  OrthancCppClient/Series.cpp
-  OrthancCppClient/Instance.cpp
-  OrthancCppClient/Patient.cpp
-
   Plugins/Engine/SharedLibrary.cpp
   Plugins/Engine/PluginsManager.cpp
   Plugins/Engine/OrthancPlugins.cpp
@@ -404,114 +395,6 @@
   )
 
 
-#####################################################################
-## Create the standalone DLL containing the Orthanc Client API
-#####################################################################
-
-if (BUILD_CLIENT_LIBRARY)
-  include_directories(${ORTHANC_ROOT}/OrthancCppClient/SharedLibrary/Laaw)
-
-  if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
-    if (CMAKE_CROSSCOMPILING)
-      # Remove the default "lib" prefix from "libOrthancClient.dll" if cross-compiling
-      set(CMAKE_SHARED_LIBRARY_PREFIX "")
-
-      if (${CMAKE_SIZEOF_VOID_P} EQUAL 4)
-        set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows32.def)
-      elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8)
-        set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows64.def)
-      else()
-        message(FATAL_ERROR "Support your platform here")
-      endif()
-    else()
-      # Nothing to do if using Visual Studio
-    endif()
-
-    if (${CMAKE_SIZEOF_VOID_P} EQUAL 4)
-      set(CMAKE_SHARED_LIBRARY_SUFFIX "_Windows32.dll")
-      list(APPEND ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows32.rc)
-    elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8)
-      set(CMAKE_SHARED_LIBRARY_SUFFIX "_Windows64.dll")
-      list(APPEND ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows64.rc)
-    else()
-      message(FATAL_ERROR "Support your platform here")
-    endif()    
-
-  else()
-    set(ORTHANC_CPP_CLIENT_AUX ${OPENSSL_SOURCES})
-  endif()
-
-  add_library(OrthancClient SHARED
-    ${ORTHANC_ROOT}/OrthancCppClient/OrthancCppClient.cpp
-    ${ORTHANC_ROOT}/OrthancCppClient/SharedLibrary/SharedLibrary.cpp
-    ${ORTHANC_ROOT}/Resources/ThirdParty/md5/md5.c
-    ${ORTHANC_ROOT}/Resources/ThirdParty/base64/base64.cpp
-    ${ORTHANC_CPP_CLIENT_AUX}
-    ${THIRD_PARTY_SOURCES}
-    ${CURL_SOURCES}
-    ${GOOGLE_LOG_SOURCES}
-    )
-
-  if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
-      ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR
-      ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
-    set_target_properties(OrthancClient
-      PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed -Wl,--version-script=${ORTHANC_ROOT}/OrthancCppClient/SharedLibrary/Laaw/VersionScript.map"
-      )
-    target_link_libraries(OrthancClient pthread)
-
-  elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
-    target_link_libraries(OrthancClient OpenSSL ws2_32)
-
-    if (CMAKE_CROSSCOMPILING)
-      set_target_properties(OrthancClient
-        PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++"
-        )
-    endif()
-
-  elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
-    # TODO
-    target_link_libraries(OrthancClient pthread)
-
-  else()
-    message(FATAL_ERROR "Support your platform here")
-  endif()
-
-
-  # Set the version of the "Orthanc Client" shared library
-  file(STRINGS
-    ${CMAKE_SOURCE_DIR}/OrthancCppClient/SharedLibrary/Product.json
-    ORTHANC_CLIENT_VERSION_TMP
-    REGEX "^[ \t]*\"Version\"[ \t]*")
-
-  string(REGEX REPLACE "^.*\"([0-9]+)\\.([0-9]+)\\.([0-9]+)\"" "\\1.\\2" 
-    ORTHANC_CLIENT_VERSION ${ORTHANC_CLIENT_VERSION_TMP})
-
-  message("Setting the version of the library to ${ORTHANC_CLIENT_VERSION}")
-
-  set_target_properties(OrthancClient PROPERTIES 
-    VERSION ${ORTHANC_CLIENT_VERSION} 
-    SOVERSION ${ORTHANC_CLIENT_VERSION})
-
-
-  install(
-    TARGETS OrthancClient
-    RUNTIME DESTINATION lib    # Destination for Windows
-    LIBRARY DESTINATION lib    # Destination for Linux
-    )
-
-  install(
-    FILES
-    ${ORTHANC_ROOT}/OrthancCppClient/SharedLibrary/AUTOGENERATED/OrthancCppClient.h 
-    ${ORTHANC_ROOT}/Plugins/Include/OrthancCPlugin.h 
-    ${ORTHANC_ROOT}/Plugins/Include/OrthancCDatabasePlugin.h 
-    ${ORTHANC_ROOT}/Plugins/Include/OrthancCppDatabasePlugin.h 
-    DESTINATION include/orthanc
-    )
-endif()
-
-
-        
 
 #####################################################################
 ## Generate the documentation if Doxygen is present
@@ -545,26 +428,6 @@
     DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/OrthancPluginDocumentation/doc/
     DESTINATION share/doc/orthanc/OrthancPlugin
     )
-
-  if (BUILD_CLIENT_LIBRARY)
-    configure_file(
-      ${CMAKE_SOURCE_DIR}/Resources/OrthancClient.doxygen
-      ${CMAKE_CURRENT_BINARY_DIR}/OrthancClient.doxygen
-      @ONLY)
-
-    add_custom_command(TARGET OrthancClient 
-      POST_BUILD
-      COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancClient.doxygen
-      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-      COMMENT "Generating client documentation with Doxygen" VERBATIM
-      )
-
-    install(
-      DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/OrthancClientDocumentation/doc/
-      DESTINATION share/doc/orthanc/OrthancClient
-      )
-  endif()
-
 else()
   message("Doxygen not found. The documentation will not be built.")
 endif()