Mercurial > hg > orthanc-client
comparison CMakeLists.txt @ 6:c584c25a74fd
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 02 Jun 2015 10:22:49 +0200 |
parents | d5027f9f676a |
children | 6d59828e2662 |
comparison
equal
deleted
inserted
replaced
5:798076adf9e9 | 6:c584c25a74fd |
---|---|
40 | 40 |
41 ##################################################################### | 41 ##################################################################### |
42 ## Create the standalone DLL containing the Orthanc Client API | 42 ## Create the standalone DLL containing the Orthanc Client API |
43 ##################################################################### | 43 ##################################################################### |
44 | 44 |
45 include_directories(OrthancCppClient/SharedLibrary/Laaw) | 45 include_directories(Resources/Laaw) |
46 | 46 |
47 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 47 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
48 if (CMAKE_CROSSCOMPILING) | 48 if (CMAKE_CROSSCOMPILING) |
49 # Remove the default "lib" prefix from "libOrthancClient.dll" if cross-compiling | 49 # Remove the default "lib" prefix from "libOrthancClient.dll" if cross-compiling |
50 set(CMAKE_SHARED_LIBRARY_PREFIX "") | 50 set(CMAKE_SHARED_LIBRARY_PREFIX "") |
51 | 51 |
52 if (${CMAKE_SIZEOF_VOID_P} EQUAL 4) | 52 if (${CMAKE_SIZEOF_VOID_P} EQUAL 4) |
53 set(ORTHANC_CPP_CLIENT_AUX OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows32.def) | 53 set(ORTHANC_CPP_CLIENT_AUX CppClient/SharedLibrary/AUTOGENERATED/Windows32.def) |
54 elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8) | 54 elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8) |
55 set(ORTHANC_CPP_CLIENT_AUX OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows64.def) | 55 set(ORTHANC_CPP_CLIENT_AUX CppClient/SharedLibrary/AUTOGENERATED/Windows64.def) |
56 else() | 56 else() |
57 message(FATAL_ERROR "Support your platform here") | 57 message(FATAL_ERROR "Support your platform here") |
58 endif() | 58 endif() |
59 else() | 59 else() |
60 # Nothing to do if using Visual Studio | 60 # Nothing to do if using Visual Studio |
61 endif() | 61 endif() |
62 | 62 |
63 if (${CMAKE_SIZEOF_VOID_P} EQUAL 4) | 63 if (${CMAKE_SIZEOF_VOID_P} EQUAL 4) |
64 set(CMAKE_SHARED_LIBRARY_SUFFIX "_Windows32.dll") | 64 set(CMAKE_SHARED_LIBRARY_SUFFIX "_Windows32.dll") |
65 list(APPEND ORTHANC_CPP_CLIENT_AUX OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows32.rc) | 65 list(APPEND ORTHANC_CPP_CLIENT_AUX CppClient/SharedLibrary/AUTOGENERATED/Windows32.rc) |
66 elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8) | 66 elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8) |
67 set(CMAKE_SHARED_LIBRARY_SUFFIX "_Windows64.dll") | 67 set(CMAKE_SHARED_LIBRARY_SUFFIX "_Windows64.dll") |
68 list(APPEND ORTHANC_CPP_CLIENT_AUX OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows64.rc) | 68 list(APPEND ORTHANC_CPP_CLIENT_AUX CppClient/SharedLibrary/AUTOGENERATED/Windows64.rc) |
69 else() | 69 else() |
70 message(FATAL_ERROR "Support your platform here") | 70 message(FATAL_ERROR "Support your platform here") |
71 endif() | 71 endif() |
72 | 72 |
73 else() | 73 else() |
86 Orthanc/Core/OrthancException.cpp | 86 Orthanc/Core/OrthancException.cpp |
87 Orthanc/Resources/ThirdParty/base64/base64.cpp | 87 Orthanc/Resources/ThirdParty/base64/base64.cpp |
88 Orthanc/Resources/ThirdParty/base64/base64.cpp | 88 Orthanc/Resources/ThirdParty/base64/base64.cpp |
89 Orthanc/Resources/ThirdParty/md5/md5.c | 89 Orthanc/Resources/ThirdParty/md5/md5.c |
90 | 90 |
91 OrthancCppClient/Instance.cpp | 91 CppClient/Instance.cpp |
92 OrthancCppClient/OrthancConnection.cpp | 92 CppClient/OrthancConnection.cpp |
93 OrthancCppClient/Patient.cpp | 93 CppClient/Patient.cpp |
94 OrthancCppClient/Series.cpp | 94 CppClient/Series.cpp |
95 OrthancCppClient/SharedLibrary/SharedLibrary.cpp | 95 CppClient/Study.cpp |
96 OrthancCppClient/Study.cpp | 96 CppClient/ArrayFilledByThreads.cpp |
97 OrthancCppClient/ArrayFilledByThreads.cpp | 97 CppClient/ThreadedCommandProcessor.cpp |
98 OrthancCppClient/ThreadedCommandProcessor.cpp | 98 |
99 SharedLibrary/SharedLibrary.cpp | |
99 | 100 |
100 ${ORTHANC_CPP_CLIENT_AUX} | 101 ${ORTHANC_CPP_CLIENT_AUX} |
101 ${THIRD_PARTY_SOURCES} | 102 ${THIRD_PARTY_SOURCES} |
102 ${CURL_SOURCES} | 103 ${CURL_SOURCES} |
103 ) | 104 ) |
112 | 113 |
113 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR | 114 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR |
114 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR | 115 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR |
115 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") | 116 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") |
116 set_target_properties(OrthancClient | 117 set_target_properties(OrthancClient |
117 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed -Wl,--version-script=${CMAKE_SOURCE_DIR}/OrthancCppClient/SharedLibrary/Laaw/VersionScript.map" | 118 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed -Wl,--version-script=${CMAKE_SOURCE_DIR}/Resources/Laaw/VersionScript.map" |
118 ) | 119 ) |
119 target_link_libraries(OrthancClient pthread) | 120 target_link_libraries(OrthancClient pthread) |
120 | 121 |
121 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 122 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
122 target_link_libraries(OrthancClient ws2_32) | 123 target_link_libraries(OrthancClient ws2_32) |
136 endif() | 137 endif() |
137 | 138 |
138 | 139 |
139 # Set the version of the "Orthanc Client" shared library | 140 # Set the version of the "Orthanc Client" shared library |
140 file(STRINGS | 141 file(STRINGS |
141 ${CMAKE_SOURCE_DIR}/OrthancCppClient/SharedLibrary/Product.json | 142 ${CMAKE_SOURCE_DIR}/SharedLibrary/Product.json |
142 ORTHANC_CLIENT_VERSION_TMP | 143 ORTHANC_CLIENT_VERSION_TMP |
143 REGEX "^[ \t]*\"Version\"[ \t]*") | 144 REGEX "^[ \t]*\"Version\"[ \t]*") |
144 | 145 |
145 string(REGEX REPLACE "^.*\"([0-9]+)\\.([0-9]+)\\.([0-9]+)\"" "\\1.\\2" | 146 string(REGEX REPLACE "^.*\"([0-9]+)\\.([0-9]+)\\.([0-9]+)\"" "\\1.\\2" |
146 ORTHANC_CLIENT_VERSION ${ORTHANC_CLIENT_VERSION_TMP}) | 147 ORTHANC_CLIENT_VERSION ${ORTHANC_CLIENT_VERSION_TMP}) |
158 LIBRARY DESTINATION lib # Destination for Linux | 159 LIBRARY DESTINATION lib # Destination for Linux |
159 ) | 160 ) |
160 | 161 |
161 install( | 162 install( |
162 FILES | 163 FILES |
163 OrthancCppClient/SharedLibrary/AUTOGENERATED/OrthancCppClient.h | 164 CppClient/SharedLibrary/AUTOGENERATED/CppClient.h |
164 DESTINATION include/orthanc | 165 DESTINATION include/orthanc |
165 ) | 166 ) |
166 | 167 |
167 | 168 |
168 | 169 |