annotate OrthancCppClient/Package/CMakeLists.txt @ 506:6e4bd06c17c5 laaw

the wrapper is working
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 18 Jul 2013 12:01:51 +0200
parents
children d87febb5f183
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
506
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 # nm -C -D --defined-only libOrthancCppClient.so
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
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 cmake_minimum_required(VERSION 2.8)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 project(OrthancCppClientTest)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 include_directories(${CMAKE_SOURCE_DIR}/Laaw)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 set(STATIC_BUILD ON)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 set(ORTHANC_ROOT ${CMAKE_SOURCE_DIR}/../..)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 include(${ORTHANC_ROOT}/Resources/CMake/JsonCppConfiguration.cmake)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 include(${ORTHANC_ROOT}/Resources/CMake/LibCurlConfiguration.cmake)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 include(${ORTHANC_ROOT}/Resources/CMake/LibPngConfiguration.cmake)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 include(${ORTHANC_ROOT}/Resources/CMake/ZlibConfiguration.cmake)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 if (${CMAKE_COMPILER_IS_GNUCXX})
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 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
22 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
23 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
24 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
25 elseif (${MSVC})
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 endif()
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 add_library(OrthancCppClient SHARED
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 SharedLibrary.cpp
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
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 ${ORTHANC_ROOT}/Resources/sha1/sha1.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 ${ORTHANC_ROOT}/Resources/md5/md5.c
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 ${ORTHANC_ROOT}/Resources/base64/base64.cpp
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 )
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/Laaw/VersionScript.map")
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 target_link_libraries(OrthancCppClient pthread)
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 endif()
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 set(CMAKE_CXX_FLAGS "-fpermissive") #TODO REMOVE