annotate Resources/Archives/OrthancCppClient.cmake @ 2746:571e0058d2b3 Orthanc-0.6.2

close old branch
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 17 Jul 2018 09:39:26 +0200
parents 31f1b7d5d7d2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
512
1b8a1c43893e compilation of the dll 32/64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 510
diff changeset
1 include_directories(${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw)
506
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 set(STATIC_BUILD ON)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 include(${ORTHANC_ROOT}/Resources/CMake/JsonCppConfiguration.cmake)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 include(${ORTHANC_ROOT}/Resources/CMake/LibCurlConfiguration.cmake)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 include(${ORTHANC_ROOT}/Resources/CMake/LibPngConfiguration.cmake)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 include(${ORTHANC_ROOT}/Resources/CMake/ZlibConfiguration.cmake)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 if (${CMAKE_COMPILER_IS_GNUCXX})
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -Wno-implicit-function-declaration") # --std=c99 makes libcurl not to compile
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wno-long-long -Wno-variadic-macros")
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 elseif (${MSVC})
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 endif()
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19
512
1b8a1c43893e compilation of the dll 32/64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 510
diff changeset
20 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
1b8a1c43893e compilation of the dll 32/64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 510
diff changeset
21 if (${CMAKE_SIZEOF_VOID_P} EQUAL 4)
1b8a1c43893e compilation of the dll 32/64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 510
diff changeset
22 set(WINDOWS_DEF ${ORTHANC_ROOT}/OrthancCppClient/Package/Build/Windows32.def)
1b8a1c43893e compilation of the dll 32/64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 510
diff changeset
23 elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8)
1b8a1c43893e compilation of the dll 32/64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 510
diff changeset
24 set(WINDOWS_DEF ${ORTHANC_ROOT}/OrthancCppClient/Package/Build/Windows64.def)
1b8a1c43893e compilation of the dll 32/64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 510
diff changeset
25 else()
1b8a1c43893e compilation of the dll 32/64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 510
diff changeset
26 message(FATAL_ERROR "Support your platform here")
1b8a1c43893e compilation of the dll 32/64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 510
diff changeset
27 endif()
1b8a1c43893e compilation of the dll 32/64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 510
diff changeset
28 endif()
1b8a1c43893e compilation of the dll 32/64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 510
diff changeset
29
506
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 add_library(OrthancCppClient SHARED
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 ${THIRD_PARTY_SOURCES}
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 ${ORTHANC_ROOT}/Core/OrthancException.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 ${ORTHANC_ROOT}/Core/Enumerations.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 ${ORTHANC_ROOT}/Core/Toolbox.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 ${ORTHANC_ROOT}/Core/HttpClient.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 ${ORTHANC_ROOT}/Core/MultiThreading/ArrayFilledByThreads.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 ${ORTHANC_ROOT}/Core/MultiThreading/ThreadedCommandProcessor.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 ${ORTHANC_ROOT}/Core/MultiThreading/SharedMessageQueue.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 ${ORTHANC_ROOT}/Core/FileFormats/PngReader.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 ${ORTHANC_ROOT}/OrthancCppClient/OrthancConnection.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 ${ORTHANC_ROOT}/OrthancCppClient/Series.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 ${ORTHANC_ROOT}/OrthancCppClient/Study.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 ${ORTHANC_ROOT}/OrthancCppClient/Instance.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 ${ORTHANC_ROOT}/OrthancCppClient/Patient.cpp
512
1b8a1c43893e compilation of the dll 32/64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 510
diff changeset
45 ${ORTHANC_ROOT}/OrthancCppClient/Package/SharedLibrary.cpp
506
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 ${ORTHANC_ROOT}/Resources/sha1/sha1.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 ${ORTHANC_ROOT}/Resources/md5/md5.c
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 ${ORTHANC_ROOT}/Resources/base64/base64.cpp
512
1b8a1c43893e compilation of the dll 32/64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 510
diff changeset
49 ${WINDOWS_DEF}
506
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 )
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
516
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 514
diff changeset
53 set_target_properties(OrthancCppClient
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 514
diff changeset
54 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--version-script=${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw/VersionScript.map"
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 514
diff changeset
55 )
506
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 target_link_libraries(OrthancCppClient pthread)
510
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
57 else()
516
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 514
diff changeset
58 set_target_properties(OrthancCppClient
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 514
diff changeset
59 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++"
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 514
diff changeset
60 )
510
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
61 target_link_libraries(OrthancCppClient ws2_32)
506
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 endif()