comparison OrthancFramework/Resources/ProtocolBuffers/ProtobufLibrary.cmake @ 5187:9466c95f70c8 db-protobuf

integrating Protobuf library into Orthanc server
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 26 Mar 2023 11:59:03 +0200
parents 8d19e53cf23e
children 4c6f0211caaf
comparison
equal deleted inserted replaced
5186:8d19e53cf23e 5187:9466c95f70c8
17 # You should have received a copy of the GNU Lesser General Public 17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this program. If not, see 18 # License along with this program. If not, see
19 # <http://www.gnu.org/licenses/>. 19 # <http://www.gnu.org/licenses/>.
20 20
21 21
22 include(${CMAKE_SOURCE_DIR}/../CMake/DownloadPackage.cmake)
23
24 DownloadPackage( 22 DownloadPackage(
25 "ca0d9b243e649d398a6b419acd35103a" 23 "ca0d9b243e649d398a6b419acd35103a"
26 "http://orthanc.uclouvain.be/third-party-downloads/protobuf-cpp-3.5.1.tar.gz" 24 "http://orthanc.uclouvain.be/third-party-downloads/protobuf-cpp-3.5.1.tar.gz"
27 "${CMAKE_CURRENT_BINARY_DIR}/protobuf-3.5.1") 25 "${CMAKE_CURRENT_BINARY_DIR}/protobuf-3.5.1")
28 26
29 set(PROTOBUF_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/protobuf-3.5.1) 27 set(PROTOBUF_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/protobuf-3.5.1)
30 28
29 include_directories(
30 ${PROTOBUF_SOURCE_DIR}/src
31 )
32
31 set(PROTOBUF_LIBRARY_SOURCES 33 set(PROTOBUF_LIBRARY_SOURCES
32 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/any.cc 34 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/any.cc
33 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/any.pb.cc 35 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/any.pb.cc
34 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/api.pb.cc 36 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/api.pb.cc
35 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/arena.cc 37 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/arena.cc
111 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/util/type_resolver_util.cc 113 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/util/type_resolver_util.cc
112 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/wire_format.cc 114 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/wire_format.cc
113 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/wire_format_lite.cc 115 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/wire_format_lite.cc
114 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/wrappers.pb.cc 116 ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/wrappers.pb.cc
115 ) 117 )
118
119 if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
120 set_property(
121 SOURCE ${PROTOBUF_LIBRARY_SOURCES}
122 PROPERTY COMPILE_DEFINITIONS "HAVE_PTHREAD=1"
123 )
124 endif()