[3party] Use CMakeLists.txt provided by protobuf

Signed-off-by: Ferenc Géczi <ferenc.gm@gmail.com>
This commit is contained in:
Ferenc Géczi 2022-11-20 00:00:00 +00:00
parent 7e1c86acc0
commit 5f1f706cb0
3 changed files with 1 additions and 197 deletions

View file

@ -1,42 +0,0 @@
project(protobuf)
set(SRC
config.h
protobuf/src/google/protobuf/arena.cc
protobuf/src/google/protobuf/extension_set.cc
protobuf/src/google/protobuf/generated_message_util.cc
protobuf/src/google/protobuf/io/coded_stream.cc
protobuf/src/google/protobuf/io/zero_copy_stream.cc
protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
protobuf/src/google/protobuf/message_lite.cc
protobuf/src/google/protobuf/repeated_field.cc
protobuf/src/google/protobuf/stubs/bytestream.cc
protobuf/src/google/protobuf/stubs/common.cc
protobuf/src/google/protobuf/stubs/int128.cc
protobuf/src/google/protobuf/stubs/once.h
protobuf/src/google/protobuf/stubs/status.cc
protobuf/src/google/protobuf/stubs/statusor.cc
protobuf/src/google/protobuf/stubs/stringpiece.cc
protobuf/src/google/protobuf/stubs/stringprintf.cc
protobuf/src/google/protobuf/stubs/structurally_valid.cc
protobuf/src/google/protobuf/stubs/strutil.cc
protobuf/src/google/protobuf/stubs/time.cc
protobuf/src/google/protobuf/wire_format_lite.cc
)
add_library(${PROJECT_NAME} ${SRC})
target_include_directories(${PROJECT_NAME}
PRIVATE . ../../
PUBLIC protobuf/src
)
if(NOT PLATFORM_WIN)
target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_PTHREAD)
endif ()
target_compile_options(${PROJECT_NAME} PRIVATE
$<$<CXX_COMPILER_ID:AppleClang,Clang>:-Wno-shorten-64-to-32>
$<$<CXX_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-deprecated-declarations>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-sign-compare>
)

View file

@ -1,154 +0,0 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* the name of <hash_map> */
#define HASH_MAP_CLASS unordered_map
/* the location of <unordered_map> or <hash_map> */
#define HASH_MAP_H <unordered_map>
/* the namespace of hash_map/hash_set */
#define HASH_NAMESPACE std
/* the name of <hash_set> */
#define HASH_SET_CLASS unordered_set
/* the location of <unordered_set> or <hash_set> */
#define HASH_SET_H <unordered_set>
/* define if the compiler supports basic C++11 syntax */
#define HAVE_CXX11 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `ftruncate' function. */
#define HAVE_FTRUNCATE 1
/* define if the compiler has hash_map */
#define HAVE_HASH_MAP 1
/* define if the compiler has hash_set */
#define HAVE_HASH_SET 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the `mkdir' function. */
#define HAVE_MKDIR 1
/* Define if you have POSIX threads libraries and header files. */
#define HAVE_PTHREAD 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Enable classes using zlib compression. */
#define HAVE_ZLIB 1
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "protobuf"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "protobuf@googlegroups.com"
/* Define to the full name of this package. */
#define PACKAGE_NAME "Protocol Buffers"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "Protocol Buffers 3.21.9"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "protobuf"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "3.21.9"
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
/* #undef PTHREAD_CREATE_JOINABLE */
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#define STDC_HEADERS 1
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
/* Version number of package */
#define VERSION "3.21.9"
/* Define to 1 if on MINIX. */
/* #undef _MINIX */
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
/* #undef _POSIX_1_SOURCE */
/* Define to 1 if you need to in order for `stat' and other things to work. */
/* #undef _POSIX_SOURCE */

View file

@ -149,7 +149,7 @@ file(COPY ${OTHER_FILES} DESTINATION ${CMAKE_BINARY_DIR})
omim_add_library(${PROJECT_NAME} ${SRC})
add_subdirectory(${OMIM_ROOT}/3party/protobuf ${CMAKE_CURRENT_BINARY_DIR}/protobuf)
add_subdirectory(${OMIM_ROOT}/3party/protobuf/protobuf ${CMAKE_CURRENT_BINARY_DIR}/protobuf)
target_link_libraries(${PROJECT_NAME}
search # search::DummyRankTable in CachingRankTableLoader