506
|
1 # nm -C -D --defined-only libOrthancCppClient.so
|
|
2
|
|
3
|
|
4 cmake_minimum_required(VERSION 2.8)
|
|
5
|
|
6 project(OrthancCppClientTest)
|
|
7
|
|
8 include_directories(${CMAKE_SOURCE_DIR}/Laaw)
|
|
9
|
|
10 set(STATIC_BUILD ON)
|
|
11 set(ORTHANC_ROOT ${CMAKE_SOURCE_DIR}/../..)
|
|
12
|
|
13 include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
|
|
14 include(${ORTHANC_ROOT}/Resources/CMake/JsonCppConfiguration.cmake)
|
|
15 include(${ORTHANC_ROOT}/Resources/CMake/LibCurlConfiguration.cmake)
|
|
16 include(${ORTHANC_ROOT}/Resources/CMake/LibPngConfiguration.cmake)
|
|
17 include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake)
|
|
18 include(${ORTHANC_ROOT}/Resources/CMake/ZlibConfiguration.cmake)
|
|
19
|
|
20 if (${CMAKE_COMPILER_IS_GNUCXX})
|
|
21 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -Wno-implicit-function-declaration") # --std=c99 makes libcurl not to compile
|
|
22 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wno-long-long -Wno-variadic-macros")
|
|
23 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
|
|
24 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
|
|
25 elseif (${MSVC})
|
|
26 add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
|
|
27 endif()
|
|
28
|
|
29 add_library(OrthancCppClient SHARED
|
|
30 SharedLibrary.cpp
|
|
31 ${THIRD_PARTY_SOURCES}
|
|
32 ${ORTHANC_ROOT}/Core/OrthancException.cpp
|
|
33 ${ORTHANC_ROOT}/Core/Enumerations.cpp
|
|
34 ${ORTHANC_ROOT}/Core/Toolbox.cpp
|
|
35 ${ORTHANC_ROOT}/Core/HttpClient.cpp
|
|
36 ${ORTHANC_ROOT}/Core/MultiThreading/ArrayFilledByThreads.cpp
|
|
37 ${ORTHANC_ROOT}/Core/MultiThreading/ThreadedCommandProcessor.cpp
|
|
38 ${ORTHANC_ROOT}/Core/MultiThreading/SharedMessageQueue.cpp
|
|
39 ${ORTHANC_ROOT}/Core/FileFormats/PngReader.cpp
|
|
40 ${ORTHANC_ROOT}/OrthancCppClient/OrthancConnection.cpp
|
|
41 ${ORTHANC_ROOT}/OrthancCppClient/Series.cpp
|
|
42 ${ORTHANC_ROOT}/OrthancCppClient/Study.cpp
|
|
43 ${ORTHANC_ROOT}/OrthancCppClient/Instance.cpp
|
|
44 ${ORTHANC_ROOT}/OrthancCppClient/Patient.cpp
|
|
45 ${ORTHANC_ROOT}/Resources/sha1/sha1.cpp
|
|
46 ${ORTHANC_ROOT}/Resources/md5/md5.c
|
|
47 ${ORTHANC_ROOT}/Resources/base64/base64.cpp
|
|
48 )
|
|
49
|
|
50 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
51 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/Laaw/VersionScript.map")
|
|
52 target_link_libraries(OrthancCppClient pthread)
|
510
|
53 else()
|
|
54 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++")
|
|
55 target_link_libraries(OrthancCppClient ws2_32)
|
506
|
56 endif()
|