Mercurial > hg > orthanc
diff OrthancFramework/Resources/ProtocolBuffers/CMakeLists.txt @ 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 | af66a8e93ccf |
line wrap: on
line diff
--- a/OrthancFramework/Resources/ProtocolBuffers/CMakeLists.txt Sun Mar 26 10:46:09 2023 +0200 +++ b/OrthancFramework/Resources/ProtocolBuffers/CMakeLists.txt Sun Mar 26 11:59:03 2023 +0200 @@ -25,16 +25,12 @@ set(ALLOW_DOWNLOADS ON) +include(${CMAKE_SOURCE_DIR}/../CMake/DownloadPackage.cmake) include(${CMAKE_SOURCE_DIR}/../CMake/Compiler.cmake) + include(${CMAKE_SOURCE_DIR}/ProtobufLibrary.cmake) -include_directories( - ${PROTOBUF_SOURCE_DIR}/src - ) - -add_executable(protoc - ${PROTOBUF_LIBRARY_SOURCES} - +set(PROTOBUF_COMPILER_SOURCES ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/compiler/code_generator.cc ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/compiler/command_line_interface.cc ${PROTOBUF_SOURCE_DIR}/src/google/protobuf/compiler/cpp/cpp_enum.cc @@ -137,7 +133,12 @@ if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") set_property( - SOURCE ${PROTOBUF_LIBRARY_SOURCES} + SOURCE ${PROTOBUF_COMPILER_SOURCES} PROPERTY COMPILE_DEFINITIONS "HAVE_PTHREAD=1" ) endif() + +add_executable(protoc + ${PROTOBUF_LIBRARY_SOURCES} + ${PROTOBUF_COMPILER_SOURCES} + )